I've done a little searching here and on google, but im not sure i even know what to search for. Im trying to figure out how to, after adding or editing a record, redirect back to the view i was on.
So, for example, i'm viewing tasks for a specific user, so im at a page /users/justin/tasks which routes to a byuser method in tasks_controller with a user param of justin. Seems to work ok. I add a new record, and save. Is there an easy way to go back to that same view after the save though? I've created a session variable called lastview (which gets set in my byuser and index methods), and redirected to that, but it just feels like there should be an easier way to do that.
Can someone point me in the right direction?
Thanks.
Trevor