Ruby on Rails: Where to define global constants?
If your model is really “responsible” for the constants you should stick them there. You can create class methods to access them without creating a new object instance: class Card < ActiveRecord::Base def self.colours [‘white’, ‘blue’] end end # accessible like this Card.colours Alternatively, you can create class variables and an accessor. This is however … Read more