Class: NoBrainer::Document::Association::HasOneThrough
- Inherits:
-
HasManyThrough
- Object
- HasManyThrough
- NoBrainer::Document::Association::HasOneThrough
- Defined in:
- lib/no_brainer/document/association/has_one_through.rb
Defined Under Namespace
Classes: Metadata
Instance Method Summary collapse
Methods inherited from HasManyThrough
Methods included from Core
#assert_target_type, #initialize
Instance Method Details
#read ⇒ Object
5 6 7 8 9 |
# File 'lib/no_brainer/document/association/has_one_through.rb', line 5 def read targets = super NoBrainer.logger.warn "#{owner} has more than one #{target_name}" if targets.size > 1 targets.first end |