Hi,

Just a question regarding the following code

> class SomeModel < AR::Base
>   FOO_LOOKUP = YAML::load_file(File.join(RAILS_ROOT, 'config',
> 'foo_lookup.yml'))
> end

Why should the model inherit from ActiveRecord::Base ?
Would the array be loaded only once if such a class was in the lib
(without AR inheritance) instead of app/models (which may require the
inheritance) ?

Thanks for your help
I'm quite interested in keeping static arrays like that in memory but
having YAML files constantly being read and structures filled would
ruin all targeted performance gain.
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to