instance method
_read_attribute
Ruby on Rails 5.0.7.2
Since v3.0.20 Last seen in v6.1.7.10Signature
_read_attribute(attr_name, &block)
This form is significantly faster on JRuby, and this is one of our biggest hotspots. github.com/jruby/jruby/pull/2562
Parameters
-
attr_namereq -
blockblock
Source
# File activerecord/lib/active_record/attribute_methods/read.rb, line 61
def _read_attribute(attr_name, &block) # :nodoc
@attributes.fetch_value(attr_name.to_s, &block)
end
Defined in activerecord/lib/active_record/attribute_methods/read.rb line 61
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::AttributeMethods::Read