Method: Mongoid::Atomic#atomic_attribute_name

Defined in:
lib/mongoid/atomic.rb

#atomic_attribute_name(name) ⇒ String

Returns path of the attribute for modification

Examples:

Get path of the attribute

address.atomic_attribute_name(:city)

Returns:

  • (String)

    The path to the document attribute in the database

Since:

  • 3.0.0



65
66
67
# File 'lib/mongoid/atomic.rb', line 65

def atomic_attribute_name(name)
  embedded? ? "#{atomic_position}.#{name}" : name
end