Quale versione di authlogic viene utilizzata da persone con Rails 3.1.Rotaie Authlogic 3.1
Ho la seguente voce nella mia Gemfile:
gem 'authlogic', :git => 'https://github.com/AndreasWurm/authlogic.git'
Il problema che ho è con un pezzo di codice nel mio ApplicationController base.
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
L'errore che sto ottenendo è con la linea:
session[:return_to] = request.request_uri
sto ottenendo un errore che dice:
undefined method `request_uri' for #<ActionDispatch::Request:0x7dadd4d8>
Ha REQUEST_URI stato rimosso dal ActionDispatch e in caso affermativo, che cosa è l'alternativa corretta?
Questo funziona fantastico! Bel lavoro Kzu. – Nizzy