Class: NoBrainer::Document::Association::HasOne::Metadata
- Inherits:
-
NoBrainer::Document::Association::HasMany::Metadata
- Object
- NoBrainer::Document::Association::HasMany::Metadata
- NoBrainer::Document::Association::HasOne::Metadata
- Defined in:
- lib/no_brainer/document/association/has_one.rb
Constant Summary
Constants inherited from NoBrainer::Document::Association::HasMany::Metadata
NoBrainer::Document::Association::HasMany::Metadata::VALID_OPTIONS
Instance Attribute Summary
Attributes included from Core::Metadata
#options, #owner_model, #target_name
Instance Method Summary collapse
Methods inherited from NoBrainer::Document::Association::HasMany::Metadata
#eager_load_owner_key, #eager_load_owner_type, #eager_load_target_key, #foreign_key, #foreign_type, #hook, #inverses, #primary_key
Methods included from EagerLoader::Generic
Methods included from Core::Metadata
#add_callback_for, #association_model, #delegate, #get_model_by_name, #hook, #initialize, #new
Instance Method Details
#base_criteria ⇒ Object
7 8 9 |
# File 'lib/no_brainer/document/association/has_one.rb', line 7 def base_criteria super.without_ordering end |
#target_model ⇒ Object
3 4 5 |
# File 'lib/no_brainer/document/association/has_one.rb', line 3 def target_model get_model_by_name([:class_name] || target_name.to_s.camelize) end |