search for: menu_categories

Displaying 2 results from an estimated 2 matches for "menu_categories".

2006 Jan 20
4
[newbie]how to use link_to to link to another controller?
...a bit puzzled by the link_to function. am writing an app to display my photographs in categories. My application layout has a sidebar to show a menu with categories from the categories table in the database (like in taken from the tutorials), to be shown on every page. I managed to get a global @menu_categories object that keeps track of all the categories that should pop up in the menu using in the application controller def initialize @menu_categories=Category.find_all end Now, if I iterate over these menu categories in the application template <% for menu_category in @menu_categories %> <%...
2006 Jul 07
9
Search on data accross many tables, linked by belongs_to
I am using Ferret and acts_as_ferret, as my search back-end for my Rails project. I have a question about using acts_as_ferret on a main table that is linked to other tables by foreign keys. Is there a way to include the information linked by the belongs_to keyword in the search results ? As an example, let''s say I have a main table ''posts'':