method

arel_columns_from_hash

arel_columns_from_hash(fields)
private

No documentation available.

# File activerecord/lib/active_record/relation/query_methods.rb, line 1958
      def arel_columns_from_hash(fields)
        fields.flat_map do |table_name, columns|
          table_name = table_name.name if table_name.is_a?(Symbol)
          case columns
          when Symbol, String
            arel_column_with_table(table_name, columns)
          when Array
            columns.map do |column|
              arel_column_with_table(table_name, column)
            end
          else
            raise TypeError, "Expected Symbol, String or Array, got: #{columns.class}"
          end
        end
      end