Ruby on Rails Render vs. Redirect


Rendering a template is the final step in the handling of a request.

Redirecting means terminating the current request and asking the client to initiate a new one.

The main reason to redirect rather than render has to do with browser reload behavior. We usually want to redirect after a POST action so that users will not be prompted to re-submit the form when they hit the back button or reload.


The Rails 4 Way