人们使用Rails 3.1版本的authlogic.
我的gemfile中有以下条目:
gem 'authlogic',:git => 'https://github.com/AndreasWurm/authlogic.git'
我的问题是在我的基础ApplicationController中的一段代码.
def require_no_user if current_user store_location flash[:notice] = "You must be logged out to access this page" redirect_to :controller => "home",:action => "index" return false end end def store_location session[:return_to] = request.request_uri end
我得到的错误是:
session[:return_to] = request.request_uri
undefined method `request_uri' for #<Actiondispatch::Request:0x7dadd4d8>
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。