You could store the rating as a constant in your config/environment.rb file:
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 Walters
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:
>
> Hello,
>
> 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.
>
> thanks!
> Adam
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--
Ryan Bigg
http://www.frozenplague.net
Feel free to add me to MSN and/or GTalk as this email.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---