# File\_column and login\_engine incompatibilities

**URL:** <https://www.ruby-forum.com/t/file-column-and-login-engine-incompatibilities/70868>\
**Category:** Rails\
**Created:** [February 20, 2006, 3:41pm UTC](https://www.ruby-forum.com/t/file-column-and-login-engine-incompatibilities/70868 "2006-02-20T15:41:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rjlyders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@rjlyders](https://www.ruby-forum.com/u/rjlyders)\
**Post date:** [February 20, 2006, 3:41pm UTC](https://www.ruby-forum.com/t/file-column-and-login-engine-incompatibilities/70868/1 "2006-02-20T15:41:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rjlyders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@rjlyders](https://www.ruby-forum.com/u/rjlyders)\
**Post date:** [February 20, 2006, 6:33pm UTC](https://www.ruby-forum.com/t/file-column-and-login-engine-incompatibilities/70868/2 "2006-02-20T18:33:08Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ## User model which it doesn’t work on.
> 
> R.Livsey  
> [http://livsey.org](http://livsey.org)
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–

- Nic

---

<div class="post-metadata">

**Author:** ![rjlyders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@rjlyders](https://www.ruby-forum.com/u/rjlyders)\
**Post date:** [February 20, 2006, 10:39pm UTC](https://www.ruby-forum.com/t/file-column-and-login-engine-incompatibilities/70868/3 "2006-02-20T22:39:57Z")

</div>

> On 2/20/06, Richard L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

> **[Livsey.org](http://livsey.org)**
>
> I’ve been using Firebase with Ember.js quite a lot recently and have just
> released Fireplace, a library to integrate the two more easily. It

---

<div class="post-metadata">

**Author:** ![rjlyders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@rjlyders](https://www.ruby-forum.com/u/rjlyders)\
**Post date:** [February 20, 2006, 10:58pm UTC](https://www.ruby-forum.com/t/file-column-and-login-engine-incompatibilities/70868/4 "2006-02-20T22:58:52Z")

</div>

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

- james

On 2/20/06, Richard L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

–

- J \*  
~
