Search code examples
ruby-on-railsruby-on-rails-3deviseruby-on-rails-3.2devise-confirmable

Display email and password in Devise confirmation email


By default devise sends this confirmation email:

Welcome [email protected]!

You can confirm your account email through the link below:

Confirm my account

I'd like it to be:

Welcome [email protected]!

Email: [email protected]

Password: xxxxxxxxx

You can confirm your account email through the link below:

Confirm my account

How can I set this up in app/views/confirmable/mailer/confirmation_instructions.html.erb? and How can I display the password since it has already been encrypted?


Solution

  • I don't think this would be possible, since the password stored in the database would be encrypted by Devise.

    In addition you shouldn't want to be e-mailing the user his password in plain-text.