redirect back to where I was before action?

Taylor Strait wrote:

For some reason I cannot find the documentation for this. How can I
store the current URI/URL so that I can return with a redirect_to?

session[last_action] = ???

You might mean session[:last_action]= perhaps.

If you want to go back to the previous page, you can use redirect_to :back.
I find it useful when POST validation fails and need to redisplay the form.


Hmmm, I have used :back with good success so far. My form gets
refreshed. I wonder if this is a browser setting thing.

Anyway, try action_name within the action.