0

My subdomain depends on the REQUEST, like @subdomain = request.subdomain

I need to send the reset password instructions with this subdomain in the URLs.

There is a way to do that with Devise?

I couldn't find a way to add an extra param to Devise and see the data in the mailer view.

matiasmasca
  • 605
  • 8
  • 14
  • You should be able to update the URL in the mailer view, which I am assuming you still need to generate and tap into, this should help. https://stackoverflow.com/questions/4276233/ruby-rails-how-do-you-customize-the-mailer-templates-of-devise#answer-4281430 – Rockwell Rice Feb 09 '21 at 22:49
  • Really no, I need to add a custom variable in the mailer that send the "reset password instruction" devise template. – matiasmasca Feb 09 '21 at 22:59
  • Yep, exactly, that URL is included in the view for the mailer so that is where you would add it. You are talking about the URL that the user clicks on when they get the email right? – Rockwell Rice Feb 09 '21 at 23:08
  • I need add there the value of a variable, in this case request.subdomain but I can't – matiasmasca Feb 11 '21 at 15:09
  • Why can't you add it to the mailer, do you not have access to the variable when the mailer is called? how do you track the subdomain value in the back end? – Rockwell Rice Feb 11 '21 at 15:25

0 Answers0