I’m currently developing an application which contains a Movie object.
I was wondering what the best way to store a limited list such as
mpaa_rating would be? The list is not likely to expand often, so i was
wondering if it was still best to store this list in a table? Or if
there was something else like acts_as_state_machine for maintaining a
simple list like this.
You could store the rating as a constant in your config/environment.rb
MPAA_RATINGS = [“Rating #1”,“Rating #2”]
And then just do a select in your form:
<%= @film.select “rating”, MPAA_RATINGS %>
On Dec 31, 2007 11:59 AM, Adam W.
Posted via http://www.ruby-forum.com/.
Feel free to add me to MSN and/or GTalk as this email.