Method: Arel::SelectManager#project

Defined in:
activerecord/lib/arel/select_manager.rb

#project(*projections) ⇒ Object


130
131
132
133
134
135
136
137
# File 'activerecord/lib/arel/select_manager.rb', line 130

def project(*projections)
  # FIXME: converting these to SQLLiterals is probably not good, but
  # rails tests require it.
  @ctx.projections.concat projections.map { |x|
    STRING_OR_SYMBOL_CLASS.include?(x.class) ? Nodes::SqlLiteral.new(x.to_s) : x
  }
  self
end