Data access problem in object when using acts_as_authenticat

Hi all,

I’m running into this frustrating issue with the acts_as_authenticated
plugin and one of the additional fields I added to the users table.

I have added a column ‘account_type’ to the users table (among several
others) which denotes the type of account it is. This stores an integer
value that is set by the system during account creation. The value is
getting set correctly and I can see that it is in fact correct when I
on it directly in the database. So, that’s not my problem. Where my
comes in is when the current_user object gets set with the data from

When I drop a debug(current_user) into the view I see this:
1” (quotes added are mine). So, it appears that my account type is not
returned, but the rest of the other additional fields that I have
return just fine. It is just this one that is throwing the whole thing
Now, when I do:

            <% test123 = User.find( rescue 0 


            <%= debug(test123) %>

the correct account_type is returned and it is displayed in the debug
as account_type: “2”

I have also taken the step of taking the above find and setting the
current_user to that object, but to no avail. So, I’m really stumped on
this is happening. Anybody have any experience with this or any clues on
this is happening? I understand what the rest of the plug in is doing,
this one part is really throwing me off.

Also, slightly unrelated… what do the values in quotes in a debug mean
versus the ones that don’t? Example being:

        city: qazx
        address_line1: "1234"

Thanks in advance,

Apologies for the “bump”, but I’m curious if anybody has had this issue
before or knows of a resolution.

Thanks in advance!


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs