Authlogic 激活问题
抱歉,如果之前有人问过这个问题,但是当我尝试在 Rails 控制台中创建 UserSession 实例(如 `UserSession.create!) 时,我遇到了 authlogic 问题。 :登录=> 'blabla', :passw...'
我得到:
Authlogic::Session::Activation::NotActivatedError: You must activate the Authlogic::Session::Base.controller with a controller object before creating objects
Rails 版本:3.0.4
也许我错过了什么? 如果有任何帮助,我将不胜感激:)
Sorry if this question was asked before but I got trouble with authlogic when I try to create UserSession instance in rails console like `UserSession.create! :login => 'blabla', :passw...'
I get:
Authlogic::Session::Activation::NotActivatedError: You must activate the Authlogic::Session::Base.controller with a controller object before creating objects
Rails version: 3.0.4
Maybe I missed something?
I'll be appreciated for any help :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来你必须
在你的 config/environment.rb 或其他地方添加类似的东西。
文章中的提示
使用 Authlogic在脚本/控制台中
It seems you have to add somthing like
into your
config/environment.rb
or somewhere.Hint taken from article
Working with Authlogic in script/console