How to handle MySQL data types SET and ENUM in the applicati

Hi,

I wonder how I should use the SET and ENUM data types in my MySQL
database combined with a rails application.

This is my current _form.rhtml file for products:

<%= error_messages_for ‘product’ %>

|

Name
<%= text_field 'product', 'name' %>

Collection
<%= text_field 'product', 'collection' %>

Statistics
<%= text_field 'product', 'statistics' %>

Quality

Sizes

Description dk
<%= text_area 'product', 'description_dk' %>

Description de
<%= text_area 'product', 'description_de' %>

Description gb
<%= text_area 'product', 'description_gb' %>

Comment
<%= text_area 'product', 'comment' %>

Image
<%= file_field 'product', 'image' %>

Quality is ENUM-type and sizes are the SET-type…

Any ideas how to handle these (or change the DB to something more useful
for rails).
|

Thanks
Preben

On May 7, 2006, at 8:45 AM, Preben wrote:

I wonder how I should use the SET and ENUM data types in my MySQL
database combined with a rails application.

They are returned as strings. Ticket 3011 by Will Sobel (http://
dev.rubyonrails.org/ticket/3011) has full support for MySQL enums.

jeremy

They are returned as strings. Ticket 3011 by Will Sobel (http://
dev.rubyonrails.org/ticket/3011) has full support for MySQL enums.

Since I’m very new to rails - how can I use that patch!

On my own computer I’m running Linux (gentoo) - and in fact, can I use
this patch on a server which I don’t have root-access to?

Thanks
Preben