instance method
hash_rows
Ruby on Rails 8.0.4
Since v3.1.12 PrivateSignature
hash_rows()
No documentation comment.
Source
# File activerecord/lib/active_record/result.rb, line 232
def hash_rows
# We use transform_values to rows.
# This is faster because we avoid any reallocs and avoid hashing entirely.
@hash_rows ||= @rows.map do |row|
column_indexes.transform_values { |index| row[index] }
end
end
Defined in activerecord/lib/active_record/result.rb line 232
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Result