method
extract_record
v4.2.7 -
Show latest stable
- Class:
ActiveRecord::Associations::JoinDependency::JoinPart
extract_record(row, column_names_with_alias)public
No documentation available.
# File activerecord/lib/active_record/associations/join_dependency/join_part.rb, line 48
def extract_record(row, column_names_with_alias)
# This code is performance critical as it is called per row.
# see: https://github.com/rails/rails/pull/12185
hash = {}
index = 0
length = column_names_with_alias.length
while index < length
column_name, alias_name = column_names_with_alias[index]
hash[column_name] = row[alias_name]
index += 1
end
hash
end