union all
This commit is contained in:
parent
7fe28494ce
commit
d75ad56e79
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue