I have a model where I want a few specific choices for a dropdown to set
a variable, very much like this:
http://stackoverflow.com/questions/14113057/how-to-have-a-drop-down-select-field-in-a-rails-form
I'm trying to work out why all the answers to this question involve
creating a new model and db table just for the three choices outlined.
Would it not make more sense just to define the choices in the User
model and have a column in the User db table with the chosen one saved
there (assuming there are only three choices, which are very unlikely to
change and the user will only have one at any one time).
I assume I am missing something important here...
--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b88efc91e25c8b3a03be8179c394a5d7%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment