Is it possible in Ruby on Rails (we're using v2 still) to allow the routes file to map a nested url EG
mydomain.com/controller/object/action
to a single action eg
:controller, :action
?
We currently have a url like mydomain.com/controller/action and i want to change it to mydomain.com/controller/object/action
Thanks in advance
You can write singular route like as follow. You will get record id in params[:id] in controller action.