Reputation: 8172
I want to modify the send_reset_password_instructions
method so that I can send some extra parameters through it to the url. Then I can read that parameter in the url and if its present I will style the view (and the mailer) in a different way.
What I really need to do is send the reset password instead of confirmation email. I have already made my app send the reset password instead of confirmation but now I need to edit the mailer and the view to be different. How can I do this?
Upvotes: 1
Views: 3087
Reputation: 606
OK so your question has 2 parts.
Overriding the send_reset_password_instructions
method:
app/mailers/devise/mailer.rb
, if you want to override it you create the same in you own app
directory.Editing the views / mailers: You just need to run this command:
rails generate devise:views
You will have the mailer views in you views folder.
Hope this helps :)
Upvotes: 6