Method: Elastictastic::ChildCollectionProxy#each

Defined in:
lib/elastictastic/child_collection_proxy.rb

#each(&block) ⇒ Object



31
32
33
34
35
36
37
38
# File 'lib/elastictastic/child_collection_proxy.rb', line 31

def each(&block)
  if block
    super if @parent.persisted?
    transient_children.each(&block)
  else
    ::Enumerator.new(self, :each)
  end
end