I am upgrading an app from 3.2.4 to Rails 4 In my previous version i used:
match ':controller(/:action(/:id))(.:format)'
match ':controller(/search)(.:format)' => ':controller#search'
Now im getting an error
C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:239:in `default_controller_and_action':
':controller' is not a supported controller name. This can lead to potential routing problems. See http://guides.rubyonrails.org/routing.html#specifying-a-controller-to-use (ArgumentError)
I have about 10 to 15 different controllers that all use search. Is there away I can use a similar code instead of writing each controller to match controller#search ?