I\'m just getting started with my first Ruby on Rails webapp. I\'ve got a bunch of different models, views, controllers, and so on.
I\'m wanting to find a good plac
Use a class method:
def self.colours ['white', 'red', 'black'] end
Then Model.colours will return that array. Alternatively, create an initializer and wrap the constants in a module to avoid namespace conflicts.
Model.colours