[Rails] (Solved) file_column and login_engine incompatibilities
Richard Livsey
richard at livsey.org
Mon Feb 20 21:41:47 GMT 2006
> On 2/20/06, Richard Livsey <richard at livsey.org> wrote:
>> Hi, has anyone come across any incompatibilities between file_column and
>> login_engine?
>> I have file_column up and running fine on other models, it's just the
>> User model which it doesn't work on.
>>
>> If I don't mixin LoginEngine::AuthenticatedUser to my model, all works
>> fine again! So there's definitely something up there.
Nic Werner wrote:
> I have the same problem, but w/a more vanilla model, and it depends on
> the image! Look for my post about 0kb files
>
> I'm running this on W2K3 Enterprise, and testing w/Webrick. Apache
> makes no difference in the problem.
Solved it!
After some liberal commenting out of code in
LoginEngine::AuthenticatedUser I narrowed it down to this line:
after_save '@new_password = false'
Commenting out this line and suddenly everything works.
That line evaluates to false, which I guess stops the callback queue maybe?
Anyway, making that evaluate to true and everything works again.
There are a number of ways you could do this, I changed that line to:
after_save :falsify_new_password
and then added the falsify_new_password method under crypt_password
(around line 130)
def falsify_new_password
@new_password = false
true
end
--
R.Livsey
http://livsey.org
More information about the Rails
mailing list