Displaying 1 result from an estimated 1 matches for "top_items".
Did you mean:
copy_items
2011 Apr 10
0
Arel Union does not support #order or #limit
...=> 5)
> new_rel = rel_a.union(rel_b)
> new_rel.to_s #=> "#<Arel::Nodes::Union:0x3da6260>"
> new_rel.to_sql #=> "( SELECT `my_models`.* FROM `my_models`
> WHERE (`my_models`.`id` = 3) UNION SELECT `my_models`.* FROM
> `my_models` WHERE (`top_items`.`id` = 5) )"
>
> Ideally, we''d be able to sort and limit the resulting `UNION`
> results in the SQL. According to [the MySQL docs for the UNION
> operator](http://dev.mysql.com/doc/refman/5.0/en/union.html), this
> should be possible (at least in MySQL). We'&...