method
hash_rows
v3.2.13 -
Show latest stable
- Class:
ActiveRecord::Result
hash_rows()private
No documentation available.
# File activerecord/lib/active_record/result.rb, line 28
def hash_rows
@hash_rows ||=
begin
# We freeze the strings to prevent them getting duped when
# used as keys in ActiveRecord::Model's @attributes hash
columns = @columns.map { |c| c.dup.freeze }
@rows.map { |row|
Hash[columns.zip(row)]
}
end
end