Is there a way to do enumerations in migrations? I.E. color(red, black, blue, green, etc) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dustin wrote:> Is there a way to do enumerations in migrations? > > I.E. color(red, black, blue, green, etc)take a look at the "enum-column" plugin http://rubyforge.org/projects/enum-column/ http://wiki.rubyonrails.com/rails/pages/Enum+Column+in+MySql think this is what I used before, and there was an update in January 2008, so hopefully it still works with Rails2. eg. t.column :color, :enum, :limit => [:red, :blue, :green, :yellow] don''t know if it''ll support sexy migrations t.enum :color, :limit => [:red, :blue, :green, :yellow] -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I tried using the sexy migrations and it didn''t seem to work. Is there something I need to install before using this? On May 20, 6:23 am, Matthew Rudy Jacobs <rails-mailing-l...@andreas- s.net> wrote:> Dustin wrote: > > Is there a way to do enumerations in migrations? > > > I.E. color(red, black, blue, green, etc) > > take a look at the "enum-column" plugin > > http://rubyforge.org/projects/enum-column/http://wiki.rubyonrails.com/rails/pages/Enum+Column+in+MySql > > think this is what I used before, > and there was an update in January 2008, > so hopefully it still works with Rails2. > > eg. > t.column :color, :enum, :limit => [:red, :blue, :green, :yellow] > > don''t know if it''ll support sexy migrations > > t.enum :color, :limit => [:red, :blue, :green, :yellow] > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---