union all

This commit is contained in:
Ilion Beyst 2015-09-10 15:59:22 +02:00
parent 81b30902f7
commit bd99e150a4

View file

@ -8,7 +8,7 @@ class TransactionsQuery
def arel
Arel::SelectManager.new(ActiveRecord::Base)
.from(issued_by(User).union(issued_by(Client)))
.from(issued_by(User).union(:all, issued_by(Client)))
.project(Arel.star)
end
@ -30,7 +30,7 @@ class TransactionsQuery
def transactions
Arel::Nodes::TableAlias.new(
incoming.union(outgoing),
incoming.union(:all, outgoing),
@perspectived.name
)
end