instance method _read_attribute

Ruby on Rails 5.1.7

Since v3.0.20 Last seen in v6.1.7.10

Available in: v3.0.20 v3.1.12 v5.0.7.2 v5.1.7 v6.0.6.1 v6.1.7.10

Signature

_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_name req
block block
Source
# File activerecord/lib/active_record/attribute_methods/read.rb, line 66
        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 66 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::AttributeMethods::Read

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close