开发者

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

开发者 https://www.devze.com 2023-04-04 17:25 出处:网络
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?

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 adv开发者_JS百科ance


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
0

精彩评论

暂无评论...
验证码 换一张
取 消