Phiên bản nào của authlogic là những người sử dụng với Rails 3.1.Rails Authlogic 3.1
tôi có các mục sau đây trong gemfile tôi:
gem 'authlogic', :git => 'https://github.com/AndreasWurm/authlogic.git'
Tôi có vấn đề là với một đoạn mã trong ApplicationController cơ sở của tôi.
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
Các lỗi tôi nhận được là với dòng:
session[:return_to] = request.request_uri
Tôi nhận được một lỗi nói:
undefined method `request_uri' for #<ActionDispatch::Request:0x7dadd4d8>
đã REQUEST_URI được gỡ bỏ từ ActionDispatch và nếu như vậy, là những gì thay thế chính xác?
Điều này hoạt động tuyệt vời! Làm tốt lắm Kzu. – Nizzy