Re: Re: Bug with ENUM?

Jarkko Laine
2005-02-18T18:32:53Z

AR doesn''t support enum data type. It''s recommended that you
use normal
varchar and use rails validations (esp. validates_inclusion_of,
http://rails.rubyonrails.com/classes/ActiveRecord/Validations/
ClassMethods.html#M000350) to check that the values are within allowed
values.

//jarkko


On 18.2.2005, at 19:24, Bob Aman wrote:

>> This seems..... wrong.... somehow.
>
> Apparently, rails doesn''t really support the MySQL enum type and I
> should use a varchar instead.  Probably should have googled for more
> information.  However, I''m still confused as to why I would get
this
> eratic behavior, even if enums weren''t supported.
Wouldn''t it make
> more sense to throw an exception if dealing with an enum?  Coming back
> with 0 in inexplicable circumstances but working fine in others
> strikes me as a Bad Thing(tm).
>
> But then again, I''m a noob, what do I know?
>
> --
> Bob Aman
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Jarkko Laine
http://jlaine.net
http://odesign.fi


_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org