开发者

Rails 3 and AuthLogic Email Activation

Working with Rails 3 and Authlogic. I am following the steps on this tutorial: http://bit.ly/l8YOGg.

Signup/login/logout are all working fine and now I am adding email activation. I have used all the code exactly as listed on the tutorial, and when I attempt to sign in as a new user I get the fol开发者_开发问答lowing error:

NoMethodError in UsersController#create
undefined method `activate_account_url' for #<Notifier:0x00000103c4c9b8>

app/mailers/notifier.rb:6:in `activation_instructions'
app/models/user.rb:21:in `send_activation_instructions!'
app/controllers/users_controller.rb:17:in `create'

Can't find anything in the Authlogic documentation or elsewhere that helps. What am I doing wrong?


activate_account_url should be a named route. Did you define your routes correctly?


To find the correct route name, check rake routes, in particular rake routes | grep activate. Then put the correct route name into notifier.rb on line 6.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜