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.

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 L. [email protected] wrote:

User model which it doesn’t work on.

R.Livsey
http://livsey.org


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

  • Nic

On 2/20/06, Richard L. [email protected] 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 W. 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

I’ve submitted this as a ticket on the engines Trac site. Thanks for
tracing this bug!

  • james

On 2/20/06, Richard L. [email protected] wrote:

I have the same problem, but w/a more vanilla model, and it depends on
after_save ‘@new_password = false’
(around line 130)


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

  • J *
    ~