trencaclosques
unread,Sep 4, 2010, 10:11:33 AM9/4/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
Hello everyone,
I'm trying to map a controller actions with the name as a action. I've
got it well:
match "/home" => "main#home", :as => :home
match "/contact" => "main#contact", :as => :contact
match "/whoweare" => "main#whoweare", :as => :whoweare
But I want to do this with only one line of code. I've tried it with
this line, but it don't work:
match ':action' => 'main#:action', :as => :action
Any idea? Thanks and greetings.