# LoginEngine File\_column interop

**URL:** <https://www.ruby-forum.com/t/loginengine-file-column-interop/58964>\
**Category:** Rails\
**Created:** [April 27, 2006, 1:44pm UTC](https://www.ruby-forum.com/t/loginengine-file-column-interop/58964 "2006-04-27T13:44:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ray\_Slakinski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6bbea6/32.png) [@Ray\_Slakinski](https://www.ruby-forum.com/u/Ray_Slakinski)\
**Post date:** [April 27, 2006, 1:44pm UTC](https://www.ruby-forum.com/t/loginengine-file-column-interop/58964/1 "2006-04-27T13:44:58Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: RIPEMD160

Hello all,

I hope someone can help me with this issue, I have the SVN  
file\_column and using LoginEngine/UserEngine with Rails 1.1.2. My  
issue is that I’m overloading the view for LoginEngine to support a  
file image upload as part of the user record and having a heck of a  
time doing so.

Near the bottom of my new \_edit.rhtml file I put in:

\<%= file\_field("user", "image\_url") %\>

which now displays the upload field as it should when I go to sign up  
a user. I placed in the actual LoginEngine user.rb model the  
“file\_column :image\_url” line just below " include  
LoginEngine::AuthenticatedUser" and I can see when I submit my form  
that some directory structure is created.

The last part I did was make a new signup.rhtml file with this as the  
start of my form:

```
<%= start_form_tag({:action => 'signup'}, :multipart => true) %>

```

This was to make sure the form was a multipart form for the upload.

The issue is that if I select a file for upload the form doesn’t  
submit, and no file was created. The form does submit if I have no  
file set to upload. ☹

Any ideas on what else I need to do to get this all to play nice with  
each other?

Ps: The reason I added the “file\_column :image\_url” right into the  
LoginEngine user model instead of overloading it is that when I tried  
to overload it the rest of my app started to have issues everywhere I  
had “authenticated?” so I felt it just easier not to fight it and  
add the info right into LoginEngine itself, which on the surface  
appears to have taken.

- – Ray Slakinski

Blog : [http://slakinski.com](http://slakinski.com)  
GPG Fingerprint : 7C1A 65C4 69A6 9CBD 2401 0921 074F CCD6 A77B 87F4

-----BEGIN PGP SIGNATURE-----

iQEVAwUBRFCuh/Ypbvru9KvVAQOQdAf/bxlj5rBdFn/kr2WipIGQP1Wts26UbXMv  
lThxiR0gkzHCnan5r/b0NRq/5O/4LXkEq0v5onZrq2g4or6gYwDbJ+FJKYusiMzk  
WRe4/oZrRqqmHh37SfAEkTbJ25ELijREI5+YDtuVNTIdi2+9Jn5IuoXIzErsfVeC  
spet5bGuFIoegTg/abYy/xjxlN9tlXhN2si3nMmQSJGCefpAR69o49VPyaNVK+x9  
4X/pkM5vnjo7YNAczWxcPK7B6dInqtYoG0kmD3CSJ0p98imk7IYzqYrLYjTzPEQT  
oFkX6aCGu816QfdUbSGaOyUsUBevc4hmCLfTNJPVvzDiOC7WQJoIgA==  
=+oen  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![Ray\_Slakinski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6bbea6/32.png) [@Ray\_Slakinski](https://www.ruby-forum.com/u/Ray_Slakinski)\
**Post date:** [April 27, 2006, 3:59pm UTC](https://www.ruby-forum.com/t/loginengine-file-column-interop/58964/2 "2006-04-27T15:59:08Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: RIPEMD160

Here is what the logs say when the transaction fails

Processing UserController#signup (for 127.0.0.1 at 2006-04-27  
09:57:29) [POST]  
Session ID: 1263df31f64b6ed1de7d0054d571ba1c  
Parameters: {“user”=\>{“image\_url”=\>#\<File:/tmp/CGI2700.4\>,  
“password\_confirmation”=\>“test1”, “lastname”=\>“the”,  
“firstname”=\>“the”, “login”=\>“the”, “password”=\>“test1”,  
“email”=\>“removed\_email\_address@domain.invalid”}, “commit”=\>“Signup”, “action”=\>“signup”,  
“controller”=\>“user”}  
User Columns (0.014115) SHOW FIELDS FROM users  
Unable to send confirmation E-Mail:  
Transaction Error: cannot abort; there is no current transaction.

- – Ray Slakinski

Blog : [http://slakinski.com](http://slakinski.com)  
GPG Fingerprint : 7C1A 65C4 69A6 9CBD 2401 0921 074F CCD6 A77B 87F4

On 27-Apr-06, at 7:44 AM, Ray Slakinski wrote:

> The last part I did was make a new signup.rhtml file with this as  
> Any ideas on what else I need to do to get this all to play nice
> 
> - – Ray Slakinski  
> spet5bGuFIoegTg/abYy/xjxlN9tlXhN2si3nMmQSJGCefpAR69o49VPyaNVK+x9  
> 4X/pkM5vnjo7YNAczWxcPK7B6dInqtYoG0kmD3CSJ0p98imk7IYzqYrLYjTzPEQT  
> oFkX6aCGu816QfdUbSGaOyUsUBevc4hmCLfTNJPVvzDiOC7WQJoIgA==  
> =+oen  
> -----END PGP SIGNATURE-----

-----BEGIN PGP SIGNATURE-----

iQEVAwUBRFDOIvYpbvru9KvVAQOSQQf+M9tOl3nkkDBEeePYd0pHtHPl/XU5WCBI  
Ki/8yhsWqhTbwYbTcuGIQX/zeOiW8aq8LW1+HZQyUAZ5olBeuKUCf8lyVkGXV3ri  
N4L+qjpxhuW88XsT0Kwl6CATLUS24s2n05ZFW3Qcr9XmL4eI6aNIvmcV7XEdyWbs  
DTK9wSQe1t3QHNIgcHVcXRSggdvqam9eZpHbexmR//lDScWQ4srX9M5pDNq35G3v  
Rc2SXZWQp5cZtVxxgrfB795aioOrctVYYHJs6Tv9KuxzYKthvrPVRbFT+4E+sGyB  
jCYSKyV8g5ngJZvwRW4drGky/cArU0h8zk19X6D4K6BGwaMUoSC3Bw==  
=7IQ/  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![Ray\_Slakinski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6bbea6/32.png) [@Ray\_Slakinski](https://www.ruby-forum.com/u/Ray_Slakinski)\
**Post date:** [April 27, 2006, 5:08pm UTC](https://www.ruby-forum.com/t/loginengine-file-column-interop/58964/3 "2006-04-27T17:08:15Z")

</div>

When using file\_column, the form helper you want to use is  
file\_column\_field, not file\_field.

Ray Slakinski wrote:

> Hello all,
> 
> I hope someone can help me with this issue, I have the SVN  
> file\_column and using LoginEngine/UserEngine with Rails 1.1.2. My  
> issue is that I’m overloading the view for LoginEngine to support a  
> file image upload as part of the user record and having a heck of a  
> time doing so.
> 
> Near the bottom of my new \_edit.rhtml file I put in:
> 
> \<%= file\_field("user", "image\_url") %\>

… ::snip::

> The issue is that if I select a file for upload the form doesn’t  
> submit, and no file was created. The form does submit if I have no  
> file set to upload. ☹
> 
> Any ideas on what else I need to do to get this all to play nice with  
> each other?
> 
> Ps: The reason I added the “file\_column :image\_url” right into the  
> LoginEngine user model instead of overloading it is that when I tried  
> to overload it the rest of my app started to have issues everywhere I  
> had “authenticated?” so I felt it just easier not to fight it and  
> add the info right into LoginEngine itself, which on the surface  
> appears to have taken.
> 
> - – Ray Slakinski

---

<div class="post-metadata">

**Author:** ![Ray\_Slakinski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/6bbea6/32.png) [@Ray\_Slakinski](https://www.ruby-forum.com/u/Ray_Slakinski)\
**Post date:** [April 27, 2006, 9:59pm UTC](https://www.ruby-forum.com/t/loginengine-file-column-interop/58964/4 "2006-04-27T21:59:18Z")

</div>

* * *

Rails mailing list  
removed\_email\_address@domain.invalid  
[http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)
