Method: ActiveRecord::AttributeMethods::Read#read_attribute

Defined in:
lib/active_record/attribute_methods/read.rb

#read_attribute(attr_name) ⇒ Object

Returns the value of the attribute identified by attr_name after it has been typecast (for example, “2004-12-12” in a data column is cast to a date object, like Date.new(2004, 12, 12)).



125
126
127
# File 'lib/active_record/attribute_methods/read.rb', line 125

def read_attribute(attr_name)
  self.class.type_cast_attribute(attr_name, @attributes, @attributes_cache)
end