I have a array of data, for example times (7:00am, 7:30am, etc.), that I want stored and referenced in a couple places.
1) Where should I store this data? I was originally thinking in my DB (I’m using mongoid) but I’m not sure if that’s over kill.
2) How would I go about referencing it? Let’s say, from a drop down menu.
In this kind of situation, I create a
Constantsmodule in lib:Then I access it wherever I need with:
Note: be sure to add
libsto your autoload path in the configuration file.