On Sunday, 10 January 2010 14:57:15 UTC-5, Matt Jones wrote:
>
> On Jan 9, 6:16 pm, codeinnova wrote:
> > So i had a boolean attribute in my model which gets interpreted to
> > tinyint(1) in mysql by rails migrations. Now tinyint(1) accepts a
> > range in mysql and i want to change my boolean at
I second Matt's point about potential for confusion. A boolean val
implies one of two values: true or false. What you're asking for -- 1
of 3 potential vals -- seems to rule out the use of a boolean to
represent that val. So, I'd recommend using some other data type.
Jeff
On Jan 10, 11:57 am,
On Jan 9, 6:16 pm, codeinnova wrote:
> So i had a boolean attribute in my model which gets interpreted to
> tinyint(1) in mysql by rails migrations. Now tinyint(1) accepts a
> range in mysql and i want to change my boolean attribute to an
> attribute which can accept 3 values(0,1,2).
> I made th
On Jan 9, 11:16 pm, codeinnova wrote:
> So my question really is, how can i make rails to accept more values
> without changing the type to something other than tinyint(1)? And why
> this weirdness?
Mysql doesn't have an actual boolean type so rails usually uses tinyint
(1) columns instead. There
4 matches
Mail list logo