method
arel_columns
v7.2.3 -
Show latest stable
- Class:
ActiveRecord::QueryMethods
arel_columns(columns)protected
No documentation available.
# File activerecord/lib/active_record/relation/query_methods.rb, line 1642
def arel_columns(columns)
columns.flat_map do |field|
case field
when Symbol
arel_column(field.to_s) do |attr_name|
adapter_class.quote_table_name(attr_name)
end
when String
arel_column(field, &:itself)
when Proc
field.call
when Hash
arel_columns_from_hash(field)
else
field
end
end
end