Class: NoBrainer::Document::Association::HasManyThrough
- Inherits:
-
Object
- Object
- NoBrainer::Document::Association::HasManyThrough
- Includes:
- Core
- Defined in:
- lib/no_brainer/document/association/has_many_through.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Metadata
Instance Method Summary collapse
Methods included from Core
#assert_target_type, #initialize
Instance Method Details
#read ⇒ Object
31 32 33 |
# File 'lib/no_brainer/document/association/has_many_through.rb', line 31 def read @targets ||= .eager_load([owner]).freeze end |
#write(new_children) ⇒ Object
35 36 37 38 |
# File 'lib/no_brainer/document/association/has_many_through.rb', line 35 def write(new_children) raise "You can't assign `#{target_name}'. " \ "Instead, you must modify delete and create `#{target_model}' manually." end |