Uninitialised constant?


I’m having problems with a class constant I’ve defined as follows:

class Customer < ActiveRecord::Base

has_many :orders

TITLES = [‘Mr’, ‘Ms’, ‘Miss’, ‘Mrs’]


Whenever I try and access this constant using Customer::TITLES, I get an
unitialized constant Customer::TITLES error.

Is my syntax wrong!?? I’m going mad tring to sort this out.

I’m wondering if the recent changes to edge Rails’ dependencies and
reloading code may be responsible??



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs