I would create a model that has the information and the create a
CONSTANT in the model that loads the data. Then it will be loaded once
in production into memory and yuo will have to do some magic when you
are going to update the info... I did this for a model that was
holding us states...

class State < ActiveRecord::Base
  NAMES_ABBREVIATIONS = self.find(:all, :order => :name).map do |s|
    [s.name, s.abbreviation]
  end
end

On Aug 24, 7:13 am, Joao Silva <rails-mailing-l...@andreas-s.net>
wrote:
> I have to store a very large hierarchical data of website categories and
> pages. What is the best way to store this? It will being used to
> generate website navigation as well as must be loaded into dropdown
> selections on forms. It is STATIC and will not change and database would
> like to be avoided.
>
> Where is best place for this?? A hash in environment.rb? Loaded into
> memory?? Must be accessed fast performance is not an ISSUE but is a
> consideration.
>
> Thank you
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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