method
hash_rows
v7.2.3 -
Show latest stable
- Class:
ActiveRecord::Result
hash_rows()private
No documentation available.
# File activerecord/lib/active_record/result.rb, line 170
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