SyntaxFix
Write A Post
Hire A Developer
Questions
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