trevrosen
unread,Jan 19, 2012, 5:38:40 PM1/19/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Authlogic
Hi,
--Summary--
Is it possible to use AuthLogic when your User model is in a
namespace? I've been working on it for the last hour or so and can't
seem to make any headway. I *have* used "authenticate_with" in my
UserSession model to let it know where my User class is now, but that
doesn't seem to help.
--Details--
I've recently had the need to move my User model into a namespace,
making it "Msm::User". Since putting it in there, I can't
authenticate/login to my app.
With acts_as_authentic in my Msm::User class, I get "undefined method
'valid_password?' for Msm::User<[object id stuff]>"
The interesting thing is that this happens in the console:
Msm::User.find(1).respond_to?(:valid_password?) # => false
Msm::User.acts_as_authentic
Msm::User.find(1).respond_to?(:valid_password?) #=> true
So then as an experiment, I tried calling the acts_as_authentic method/
block from inside an initializer instead of inside the class
definition. Still can't login, but I get a different error --
"undefined method 'last_login_address=' for for Msm::User<[object id
stuff]>"
Any help/illumination will be greatly appreciated!
-TR