Fixed use of delete!()
This commit is contained in:
parent
11c84c0fe0
commit
492a38ad35
3 changed files with 3 additions and 3 deletions
|
@ -68,7 +68,7 @@ returns
|
|||
|
||||
# fallback do sql query
|
||||
# - stip out * we already search for *query* -
|
||||
query.delete! '*', ''
|
||||
query.delete! '*'
|
||||
organizations = Organization.where(
|
||||
'name LIKE ? OR note LIKE ?', "%#{query}%", "%#{query}%"
|
||||
).order('name').limit(limit)
|
||||
|
|
|
@ -146,7 +146,7 @@ returns
|
|||
# do query
|
||||
# - stip out * we already search for *query* -
|
||||
if query
|
||||
query.delete! '*', ''
|
||||
query.delete! '*'
|
||||
tickets_all = Ticket.select('DISTINCT(tickets.id)')
|
||||
.where(access_condition)
|
||||
.where( '( `tickets`.`title` LIKE ? OR `tickets`.`number` LIKE ? OR `ticket_articles`.`body` LIKE ? OR `ticket_articles`.`from` LIKE ? OR `ticket_articles`.`to` LIKE ? OR `ticket_articles`.`subject` LIKE ?)', "%#{query}%", "%#{query}%", "%#{query}%", "%#{query}%", "%#{query}%", "%#{query}%" )
|
||||
|
|
|
@ -68,7 +68,7 @@ returns
|
|||
|
||||
# fallback do sql query
|
||||
# - stip out * we already search for *query* -
|
||||
query.delete! '*', ''
|
||||
query.delete! '*'
|
||||
if params[:role_ids]
|
||||
users = User.joins(:roles).where( 'roles.id' => params[:role_ids] ).where(
|
||||
'(users.firstname LIKE ? or users.lastname LIKE ? or users.email LIKE ?) AND users.id != 1', "%#{query}%", "%#{query}%", "%#{query}%",
|
||||
|
|
Loading…
Reference in a new issue