Displaying 1 result from an estimated 1 matches for "frontendcontrol".
2006 Jan 23
5
Undefined method error
...lass BlogCategory < ActiveRecord::Base
has_and_belongs_to_many :blog_posts
validates_presence_of :name
validates_uniqueness_of :name
# Return all categories ordered by name
def all_categories
find :all, :order => ''name''
end;
end
I call this function from FrontendController with simple:
@all_categories = BlogCategory.all_categories
As far as I can see there IS an all_categories method in BlogCategory
class, but from some reason I can''t access it in controller.
Any ideas? I''m totally new to Ruby so I don''t know where to start (tried
g...