Hello!

I'm trying to create a menu. I have a controller that takes two
attributes, like this:

def category(gender, category)
  @ads = Ad.find_all_by_gender_and_category(gender,
category).paginate(:page => params[:page])
  @title = "Startsidan"
  render 'home'
end

And in my view I have a list with menu options:

<li class="li_content"><%= link_to "Accessoarer", :action =>
"category('dam', 'Accessoarer')" %></li><br />

And my routes it look like this:

match '/dam-accessoarer',       :to => "pages#category('dam',
'Accessoarer')"

But it doesn't work.

I get the following error.

Unknown action

The action 'category('dam', 'Accessoarer')' could not be found for
PagesController

Any help on how to solve it would be greatly appreciated!

Thanks!
// Anders

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to