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
|
def arel
|
||||||
Arel::SelectManager.new(ActiveRecord::Base)
|
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)
|
.project(Arel.star)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class TransactionsQuery
|
||||||
|
|
||||||
def transactions
|
def transactions
|
||||||
Arel::Nodes::TableAlias.new(
|
Arel::Nodes::TableAlias.new(
|
||||||
incoming.union(outgoing),
|
incoming.union(:all, outgoing),
|
||||||
@perspectived.name
|
@perspectived.name
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue