- Given that I have a large form
- When the user submits it
- And the validation of the data fails
- Then the user is redirected to the previous page again
- And the form should contain the data that the user previously submitted
How can I achieve the last part? 😛
There is something like flash[] for the form_for helper?
I have to use AJAX?
As some of the comments have suggested, this can be the default behavior, if you’re using best practices.
Here’s an example of the new/create controller actions that should exhibit said behavior: