Em 31-05-2012 11:52, Rodrigo Rosenfeld Rosas escreveu:
Em 31-05-2012 11:48, Maksym Melnychok escreveu:
@ Rafael Mendonça França
legacy databases storage must be concern of corresponding database
adapter, if a field is of boolean type, whatever that means on storage
level of particular database, that field must be treated as boolean
in rails
on the model level.
i'm not suggesting to drop such functionality for boolean attributes,
only
for non-booleans where #{attribute}? literally makes no sense when you
read it.
methods count would be decreased because rails would generate query
method only for boolean attributes.
I guess Rafael meant another thing. You have boolean fields in
PostgreSQL but someone might prefer to use some old ANSI types, like
INTEGER for storing such booleans for some reason.
Actually PG do support the ANSI boolean type. But some will prefer some
other ANSI type because other databases don't support the boolean type:
<http://en.wikipedia.org/wiki/SQL:1999>http://en.wikipedia.org/wiki/SQL:1999#Boolean_data_types
--
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en.