Preben
2006-May-07 15:45 UTC
[Rails] How to handle MySQL data types SET and ENUM in the application
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'' %> | <!--[form:product]--> <p><label for="product_name">Name</label><br/> <%= text_field ''product'', ''name'' %></p> <p><label for="product_collection">Collection</label><br/> <%= text_field ''product'', ''collection'' %></p> <p><label for="product_statistics">Statistics</label><br/> <%= text_field ''product'', ''statistics'' %></p> <p><label for="product_quality">Quality</label><br/> </p> <p><label for="product_sizes">Sizes</label><br/> </p> <p><label for="product_description_dk">Description dk</label><br/> <%= text_area ''product'', ''description_dk'' %></p> <p><label for="product_description_de">Description de</label><br/> <%= text_area ''product'', ''description_de'' %></p> <p><label for="product_description_gb">Description gb</label><br/> <%= text_area ''product'', ''description_gb'' %></p> <p><label for="product_comment">Comment</label><br/> <%= text_area ''product'', ''comment'' %></p> <p><label for="product_image">Image</label><br/> <%= file_field ''product'', ''image'' %></p> <!--[eoform:product]--> -------------------------------------------- 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
Jeremy Kemper
2006-May-07 18:06 UTC
[Rails] How to handle MySQL data types SET and ENUM in the application
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
Preben Holm
2006-May-07 19:20 UTC
[Rails] Re: How to handle MySQL data types SET and ENUM in the appli
> 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 -- Posted via http://www.ruby-forum.com/.