Displaying 3 results from an estimated 3 matches for "list_categories".
2006 Feb 13
2
categories and admin/categories - different controllers and templates?
...Right now, I have a Category controller with many
before_filter only/except clauses, and render
:layout=>''public''|''admin'' in many functions. And I
have several other contollers - yuck. I thought about
putting everything in one big monolithic admin
controller (list_categories, edit_category,
destroy_category, list_members, list_links, etc.).
Thanks for any thoughts!
csn
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
2006 Jul 23
3
Newbie: Display hierarchical Records in a view
...e two models: category and subcategory. (one to many
relationship), and a controller ''home''
I''d like to display all the categories and their sub categories in the
view: home\index.rhtml.
I have a method in the ''home'' controller'' like this:
def list_categories
@categories = Category.find(:all)
end
This list all the categories on a view, but I don''t know how to get
all the sub categories that belong to their parent category. I''d like
to display them like this in home\index.rhtml:
Category 2
* subCategory 1
* subCategory 2
Categor...
2006 Apr 09
7
Simple Search
I''m trying to implement a search system and I''m lost as to how to go
about it.
I''m searching the model "category", and I''m searching the "name" field.
>From there I''ll use @categories.listings to display. But that''s the easy
part.
I assume I need to use a LIKE command in MySQL, but I don''t know how to
do