Module: ActiveSupport::Dependencies::ModuleConstMissing
- Defined in:
- lib/gems/activesupport-2.2.2/lib/active_support/dependencies.rb
Overview
Module includes this module
Class Method Summary collapse
-
.excluded(base) ⇒ Object
:nodoc:.
-
.included(base) ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#const_missing_with_dependencies(class_id) ⇒ Object
Use const_missing to autoload associations so we don’t have to require_association when using single-table inheritance.
- #unloadable(const_desc = self) ⇒ Object
Class Method Details
.excluded(base) ⇒ Object
:nodoc:
64 65 66 67 68 69 70 71 72 |
# File 'lib/gems/activesupport-2.2.2/lib/active_support/dependencies.rb', line 64 def self.excluded(base) #:nodoc: base.class_eval do if defined? const_missing_without_dependencies undef_method :const_missing alias_method :const_missing, :const_missing_without_dependencies undef_method :const_missing_without_dependencies end end end |
.included(base) ⇒ Object
:nodoc:
56 57 58 59 60 61 62 |
# File 'lib/gems/activesupport-2.2.2/lib/active_support/dependencies.rb', line 56 def self.included(base) #:nodoc: base.class_eval do unless defined? const_missing_without_dependencies alias_method_chain :const_missing, :dependencies end end end |
Instance Method Details
#const_missing_with_dependencies(class_id) ⇒ Object
Use const_missing to autoload associations so we don’t have to require_association when using single-table inheritance.
76 77 78 |
# File 'lib/gems/activesupport-2.2.2/lib/active_support/dependencies.rb', line 76 def const_missing_with_dependencies(class_id) ActiveSupport::Dependencies.load_missing_constant self, class_id end |
#unloadable(const_desc = self) ⇒ Object
80 81 82 |
# File 'lib/gems/activesupport-2.2.2/lib/active_support/dependencies.rb', line 80 def unloadable(const_desc = self) super(const_desc) end |