KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a class ConstData: class ConstData US_CITIES = ['miami', 'new york'] EUROPERN_CITIES = ['madrid', 'london'] end Its stored under /lib/const_data.rb The idea is that inside a model, controller or view I can do: ConstData::US_CITIES to get the US_CITIES etc Rails should load this class automatically, I got this from: http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/662abfd1df9b2612?hl=en However this does not work. Can anyone explain me how to accomplish this ?
Tags (comma-separated)
Save Edits
Cancel