Topic: Rename New route


I was wondering is there a way I can rename the new action. I tried it, but I was getting errors. I don't want my url to look like

I would like the url to look like

Thanks for your help.

Re: Rename New route

You can 'personalize' your routes for example like that:

map.connect '' ,
:conditions => { :method => :get },
:controller => "your_controller" ,
:action => "my_newname"

And by the same way you'll have to personalize all the action you want. Another way to do - like that, by just adding a collection of new actions to the exisiting ones:

 map.resources :project_search, :collection=>{:results=>:get}

Last edited by Javix (2009-11-09 09:45:44)

Re: Rename New route

thanx Javix ,........