Can i know how to fetch the id in the url: http://localhost/vra/option/2/ (controller: option) Here the id:2 is the newly added record in http://localhost/vra/owner/add/ (controller: owner, method: add) Now i want to fetch that id n keep in: <%= link_to _('Back to Previous Page'), :controller => 'owner', :action => 'edit', :id => owner.id %> (Go back n edit the previous record:2) Let me know your comments???
CommentAuthorKaste
Hm, if you have a route
/option/:id
f.i. then you should have the id straight in your $this->params array, you could pass it to the view, whatever you do inside your action. By default it actually gets passed to the view, I think.