Method: ActiveRecord::AttributeMethods::Read#_read_attribute

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

#_read_attribute(attr_name, &block) ⇒ Object Also known as: attribute

This method exists to avoid the expensive primary_key check internally, without breaking compatibility with the read_attribute API



38
39
40
# File 'activerecord/lib/active_record/attribute_methods/read.rb', line 38

def _read_attribute(attr_name, &block) # :nodoc:
  @attributes.fetch_value(attr_name, &block)
end