LondonGuy
LondonGuy

Reputation: 11098

How do I easily set devise in ruby on rails 3 to email forgotten password information?

Is there a quick way to do this? I've never used mail in rails before. Isn't this all set up in devise leaving me a small modification to make to make it work?

Thanks in advance

Upvotes: 0

Views: 45

Answers (1)

Brett Bender
Brett Bender

Reputation: 19738

In your user model, you need a devise call to tell devise what facets of it you want to use. As long as it includes :recoverable, devise itself includes all the views and logic to make this work (except actually sending the mail - you need to configure your mail server yourself).

class User < ActiveRecord::Base
  devise :database_authenticatable, :registerable, :confirmable, :recoverable
end

Upvotes: 1

Related Questions