[Rails] Re: Getting data from the database only once

Michael
Tue, 25 Jul 2006 05:50:44 -0000

Anand,

Try acts_as_enumerated - it will load at application startup and utilize
throughout w/o having to fetch again.

http://wiki.rubyonrails.com/rails/pages/Acts+As+Enumerated+Plugin

I use this for several lookup values - like your state situation.  You
can use one table and add virtuals to it so that you have a master
lookup table with name/value pairs.

Let me know if you need additional details about it.

Regards,

Michael

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