lib/mongoid/attributes.rb
# Read a value from the attributes before type cast. If the value has not
# yet been assigned then this will return the attribute's existing value
# using read_attribute.
#
# @example Read an attribute before type cast.
#   person.read_attribute_before_type_cast(:price)
#
# @param [ String, Symbol ] name The name of the attribute to get.
#
# @return [ Object ] The value of the attribute before type cast, if
#   available. Otherwise, the value of the attribute.
#
# @since 3.1.0
Read a value from the attributes before type cast. If the value has not
yet been assigned then this will return the attribute's existing value
using read_attribute.
Read a value from the attributes before type cast . If the value has not yet been assigned then this will return the attribute ' s existing value using read_attribute .
def read_attribute_before_type_cast(name)
      attr = name.to_s
      if attributes_before_type_cast.has_key?(attr)
        attributes_before_type_cast[attr]
      else
        read_attribute(attr)
      end
    end
def read_attribute_before_type_cast ( name ) attr = name . to_s if attributes_before_type_cast . has_key? ( attr ) attributes_before_type_cast [ attr ] else read_attribute ( attr ) end end
Read a value from the attributes before type cast.
Read a value from the attributes before type cast .
The value of the attribute before type cast, if available. Otherwise, the value of the attribute.
The value of the attribute before type cast if available . Otherwise the value of the attribute .
 Object 
name
name The name of the attribute to get.
name The name of the attribute to get .
example
Read an attribute before type cast. person.read_attribute_before_type_cast(:price)
Read an attribute before type cast . person . read_attribute_before_type_cast ( : price )
since
None