I am trying to access the constant VALID_FIND_OPTIONS defined in ActiveRecord::Base (active_record/base.rb Line 2402 Rails 2.3.5).
ActiveRecord::Base::VALID_FIND_OPTIONS
I get the NameError exception.
NameError: uninitialized constant ActiveRecord::Base::VALID_FIND_OPTIONS
I have accessed the class constants in other libraries using the similar syntax before. I am not sure where I am going wrong.
The constant
VALID_FIND_OPTIONSwas defined inside the anonymous class ofActiveRecord::Base, hence it was not accessible asActiveRecord::Base::VALID_FIND_OPTIONSThe constant can be accessed using following syntax: