Hey,
please help me to understand something. In Authlogic example in UsersController
it's always used @current_user
, so for instance:
def show
@user = @current_user
end
(taken from http://github.com/binarylogic/authlogic_example/blob/master/app/controllers/users_controller.rb)
Why is that? In my controllers I use just current_user
instead of @current_user
.
And besides - Authlogic works perfectly for me, but I don't see magic columns being populated (like last_login_at
or last_login_ip
). Should I initialize them somehow specifically besides just adding into migration?
UPD
After some investigation, I found that if there're only fields last_login_at
and last_login_ip
from "Magic fields", then they will not be populated. If I add a full set of magic fields, it is working perfectly.
UPD2
My concern regarding current_user is only about UsersController
: why does it have @current_user
and not current_user
?