instance method to_h

Ruby on Rails 8.1.2

Since v8.0.4

Available in: v8.0.4 v8.1.2

Signature

to_h()

No documentation comment.

Source
# File activerecord/lib/active_record/result.rb, line 91
      def to_h
        @column_indexes.transform_values { |index| @row[index] }
      end

Defined in activerecord/lib/active_record/result.rb line 91 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::Result::IndexedRow

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