Richard Livsey
2006-Feb-20 14:40 UTC
[Rails] file_column and login_engine incompatibilities
Hi, has anyone come across any incompatibilities between file_column and login_engine? I''ve been having strange issues where a User model with file_column in it is failing to save the images properly. Everything uploads to the tmp dir fine, but then it never gets copied to the proper permanent location. No errors - everything happens fine except for that final part. 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. I''m off to a meeting now so can''t look any further, but will spend the evening ripping it apart to see what''s wrong unless anyone else has come across this before, or can point me in the right direction! Thanks in advance to any advice or pointers. -- R.Livsey http://livsey.org
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. On 2/20/06, Richard Livsey <richard@livsey.org> wrote:> Hi, has anyone come across any incompatibilities between file_column and > login_engine? > > I''ve been having strange issues where a User model with file_column in > it is failing to save the images properly. Everything uploads to the tmp > dir fine, but then it never gets copied to the proper permanent location. > > No errors - everything happens fine except for that final part. > > 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. > > I''m off to a meeting now so can''t look any further, but will spend the > evening ripping it apart to see what''s wrong unless anyone else has come > across this before, or can point me in the right direction! > > Thanks in advance to any advice or pointers. > > -- > R.Livsey > http://livsey.org > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- - Nic
Richard Livsey
2006-Feb-20 21:36 UTC
[Rails] (Solved) file_column and login_engine incompatibilities
> On 2/20/06, Richard Livsey <richard@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
James Adam
2006-Feb-20 21:55 UTC
[Rails] (Solved) file_column and login_engine incompatibilities
I''ve submitted this as a ticket on the engines Trac site. Thanks for tracing this bug! - james On 2/20/06, Richard Livsey <richard@livsey.org> wrote:> > On 2/20/06, Richard Livsey <richard@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 > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- * J * ~