Store limited list in db?

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

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 W.
[email protected]
wrote:

thanks!
Adam

Posted via http://www.ruby-forum.com/.


Ryan B.

Feel free to add me to MSN and/or GTalk as this email.