Class: NoBrainer::Document::Association::HasOneThrough

Inherits:
HasManyThrough
  • Object
show all
Defined in:
lib/no_brainer/document/association/has_one_through.rb

Defined Under Namespace

Classes: Metadata

Instance Method Summary collapse

Methods inherited from HasManyThrough

#write

Methods included from Core

#assert_target_type, #initialize

Instance Method Details

#readObject



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