Topic: Rename New route

Hi:

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 domainname.com/controller/new.

I would like the url to look like domainname.com/controller/mynewname.

Thanks for your help.

Re: Rename New route

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

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

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 ,........