ActiveRecord and BOOL columns


#1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I’m aware that AR automatically turn TINYINT(1) into a true or false
object, but does it create an attribute accessor that uses Ruby
naming conventions?
Example: User.logged_in is either true or false, but can I call
User.logged_in?

If not, is there anyone working on this, or any reason why it would
or would not be a good idea?

Thanks,

  • –Jeff
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.1 (Darwin)

iD8DBQFDdTZYG9xIoXK+giARAlZEAKDgAXOvFIb8HiT9Ex7G3HiPEOHcDACeI2UQ
kk4KvM4LP2Z/Q51/K9Dlw5k=
=myLt
-----END PGP SIGNATURE-----


#2

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 11, 2005, at 4:24 PM, Jeff S. wrote:

I’m aware that AR automatically turn TINYINT(1) into a true or
false object, but does it create an attribute accessor that uses
Ruby naming conventions?
Example: User.logged_in is either true or false, but can I call
User.logged_in?

If not, is there anyone working on this, or any reason why it would
or would not be a good idea?

It does.

./script/console is crying your name :slight_smile:

jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDdTlOAQHALep9HFYRAupyAJsEGUBw5CFI7kUV05rxBqs2NwseAACeL8Qk
2mosOn2+zJzipIBusfVy4F0=
=VF+p
-----END PGP SIGNATURE-----