人们使用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>