Displaying 7 results from an estimated 7 matches for "categorycontroller".
Did you mean:
category_controller
2006 Jan 18
3
Documentation for scaffold / views
...r the view. I''d like to know exactly
what work is performed by the scaffold so that I can know this when
over-riding the view. (OR, is it that the controller makes these
variables available by default?..)
EXAMPLE: (drawn from Recipes tutorial)
Let''s start with this:
class CategoryController < ApplicationController
scaffold :category
end
Now app/views/category/show.rhtml can access @category. However as soon
as I over-ride the show, like so...
class CategoryController < ApplicationController
scaffold :category
def show
end
end
..@category is no longer available to the sh...
2006 Jun 30
1
using routes.rb from inside a controller / render_component_as_string / generally stumped
...might be something like the
following. What I''m trying to do is much more complicated but I think
this tiny example shows where I am stuck.
Into their browser a user types
"http://my.domain.com/admin/category/updates". I have a controller
roughly like the following
class Admin::CategoryController < ApplicationController
def updates
# a url for a get request that isn''t actually hard coded like this example
url = "/admin/category/info/1"
# the following line is the tricky one.
str = get(url)
render :text=>str
end
def info
@category =...
2006 Jan 15
2
scaffold suddenly pluralizing names
I haven''t updated rails today and all of a sudden scaffold is
pluralizing my names
ruby script/generate scaffold Admin::Category
produces
class Admin::CategoriesController < ApplicationController
Do I really want "CategoriesController" instead of "CategoryController"?
Thanks,
Peter
2005 Apr 26
0
NoMethodError (undefined method `fetch_fields' for nil:NilClass)
...Rails (and Ruby) and I can''t get it to work properly.
Every time I want to do something with my database-connection (e.g.
use scaffold) I get this, or something similiar (from development.log):
>> Beneath this code there''s some more text <<
-------
Processing CategoryController#index (for 127.0.0.1 at Tue Apr 26
21:43:45 CEST 2005)
Parameters: {"action"=>"index", "controller"=>"category"}
[4;33mCategory Count (0.001415) [1;37mSELECT COUNT(*) FROM
categories
NoMethodError (undefined method `fetch_fields''...
2006 Jul 19
3
Rails & Mongrel & Lighttpd > NameError in Production
hallo there,
i got a problem with switching from development- to production-mode in
my rails project. in development everything is working fine, but in
production i keep on getting a NameError...
[quote]
NameError in Appointments/admin/appointment categoryController#list
uninitialized constant Appointments::Admin::AppointmentCategory
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in
`const_missing''
/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:133:in
`const_missing'...
2005 Jul 15
5
Nested Controllers
Hi there,
I wondered if anybody had any experience with having nested
controllers?For example, I''d like a hierarchy something like this:
/product
/product/list
/product/detail
/product/detail/category
I can''t find any documentation on this, so any advice/experience
anybody might have would prove useful.
N.B. This is for a generator which builds Views and Controllers
2011 Nov 02
4
undefined method `updated_at' for #<Classified:0x686c5e4>
HEllo, I have the following problem with rails, I am new in this...is
there anyone who explain to me what´s happens?
Thanks
See below:
NoMethodError in Classified#show
Showing app/views/classified/show.rhtml where line #17 raised:
undefined method `updated_at'' for #<Classified:0x686c5e4>
Extracted source (around line #17):
14:
15: <strong>Date Posted:</strong>