Reputation: 373
I'm trying to change redirect response after user submits an invalid e-mail (not stored in database).
To handle when the email is stored, following this instruction it's easy to figure out. But, how can I set the redirect response when the e-mail is invalid?
Any help? Thanks
Upvotes: 0
Views: 54
Reputation: 8574
You'll want to start by following the instructions that you linked to in order to create a custom passwords_controller.rb
. Then you need to override the create
method from the original devise/passwords_controller.rb
Instead of respond_with(resource)
when the email is not successfully sent you could redirect to wherever you want.
Upvotes: 1