Sunday, December 11, 2011

[Rails] Multiple select

Is it possible to save multiple select values into one table sell?

<SELECT MULTIPLE SIZE=4>
<OPTION VALUE="A">Option A
<OPTION VALUE="B">Option B
<OPTION VALUE="C">Option C
<OPTION VALUE="D">Option D
</SELECT>

I know, there should be two tables, but... there is 3 miljons rows in
table and 99% of rows has only one select value..

So is it possible to make something like this:

data (id, name, select)

1, "xxxx", "A"
2, "xxxx", "B"
2, "xxxx", "A,B"

Some "hack" to forms and controller?

--
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@googlegroups.com.
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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate