Improved join.
This commit is contained in:
parent
5a3f8c1bb6
commit
1ffc19455a
1 changed files with 1 additions and 1 deletions
|
@ -166,7 +166,7 @@ returns
|
|||
else
|
||||
query_condition, bind_condition, tables = selector2sql(condition)
|
||||
tickets_all = Ticket.select('DISTINCT(tickets.id), tickets.created_at')
|
||||
.from("tickets#{tables}")
|
||||
.joins(tables)
|
||||
.where(access_condition)
|
||||
.where(query_condition, *bind_condition)
|
||||
.order('tickets.created_at DESC')
|
||||
|
|
Loading…
Reference in a new issue