How do you use ARel's #as method?

Posted by jamesmoorecode on Stack Overflow See other posts from Stack Overflow or by jamesmoorecode
Published on 2010-04-06T20:44:36Z Indexed on 2010/04/19 3:23 UTC
Read the original article Hit count: 463

Filed under:
|
|

If you build a projection like this:

t = Arel::Table.new(:projects)
ps = t.project(t[:id].as(:snark))

How do you get the result column that's named :snark?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about arel