about routes

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.

I forgot to say that I'm using Rails 3 and Ruby 1.9.2 .