Class: Object

Inherits:
BasicObject
Defined in:
lib/active_record/support/dependencies.rb

Instance Method Summary collapse

Instance Method Details

#const_missing(class_id) ⇒ Object



61
62
63
64
65
66
67
68
# File 'lib/active_record/support/dependencies.rb', line 61

def const_missing(class_id)
  begin
    require_dependency(Inflector.underscore(Inflector.demodulize(class_id.to_s)))
    return Object.const_get(class_id) if Object.const_defined?(class_id)
  rescue LoadError
    pre_dependency_const_missing(class_id)
  end
end

#pre_dependency_const_missingObject



59
# File 'lib/active_record/support/dependencies.rb', line 59

alias_method :pre_dependency_const_missing, :const_missing