lib/mongoid/atomic/paths/embedded/many.rb
# Get the position of the document in the hierarchy. This will
# include indexes of 1-n embedded associations that may sit above the
# embedded many.
#
# @example Get the position.
#   many.position
#
# @return [ String ] The position of the document.
Get the position of the document in the hierarchy. This will
include indexes of 1-n embedded associations that may sit above the
embedded many.
Get the position of the document in the hierarchy . This will include indexes of 1 - n embedded associations that may sit above the embedded many .
def position
            pos = parent.atomic_position
            locator = document.new_record? ? "" : ".#{document._index}"
            "#{pos}#{"." unless pos.blank?}#{document._association.store_as}#{locator}"
          end
def position pos = parent . atomic_position locator = document . new_record? ? "" : ".#{document._index}" "#{pos}#{"." unless pos.blank?}#{document._association.store_as}#{locator}" end
Get the position of the document in the hierarchy.
Get the position of the document in the hierarchy .
The position of the document.
The position of the document .
 String 
example
Get the position. many.position
Get the position . many . position