I am just diving into Rails and I am a bit puzzled by the link_to
am writing an app to display my photographs in categories. My
has a sidebar to show a menu with categories from the categories table
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
categories that should pop up in the menu using in the application
Now, if I iterate over these menu categories in the application template
<% for menu_category in @menu_categories %>
<% link_to menu_category.category, :action =>‘list_photos’,:id
<% end %>
I get the following links:
http://192.168.1.100:8000/categories/list_photos/3 (when in categories
http://192.168.1.100:8000/photos/list_photos/3 (when in photos
What I want however is to have the second link always, regardles where I
the app. So How do I instruct the link_to helper to always link to a
controller in the app?