Newbie question
Hi there I have links that goes to my edit address form in several views. Does RoR have any clever helpers/ways to return my user to the originating view when they have finished with the edit form ??? or do need to roll my own
Thanks
Newbie question
Hi there I have links that goes to my edit address form in several views. Does RoR have any clever helpers/ways to return my user to the originating view when they have finished with the edit form ??? or do need to roll my own
Thanks
try
redirect_to :back
upon a successful save
Hi Justin,
macarthy wrote:
Does RoR have any clever helpers/ways to return my user to the originating view when they have finished with the edit form ???
redirect_to :back
From the doc on the redirect_to method at api.rubyforge.org
Back to the page that issued the request. Useful for forms that are triggered from multiple places. Short-hand for redirect_to(request.env["HTTP_REFERER"])
hth, Bill