Fixed syntax error.
This commit is contained in:
parent
23f350df0f
commit
81a5e0537d
1 changed files with 3 additions and 3 deletions
|
@ -445,16 +445,16 @@ class TicketOverviewsController < ApplicationController
|
||||||
# do query
|
# do query
|
||||||
user_all = User.find(
|
user_all = User.find(
|
||||||
:all,
|
:all,
|
||||||
:limit => limit,
|
:limit => limit,
|
||||||
:conditions => ['firstname LIKE ? or lastname LIKE ? or email LIKE ?', "%#{query}%", "%#{query}%", "%#{query}%"],
|
:conditions => ['firstname LIKE ? or lastname LIKE ? or email LIKE ?', "%#{query}%", "%#{query}%", "%#{query}%"],
|
||||||
:order => 'firstname'
|
:order => 'firstname'
|
||||||
)
|
)
|
||||||
|
|
||||||
# build result list
|
# build result list
|
||||||
users = []
|
users = []
|
||||||
user_all.each do |user|
|
user_all.each do |user|
|
||||||
realname = user.firstname.to_s + ' ' + user.lastname.to_s
|
realname = user.firstname.to_s + ' ' + user.lastname.to_s
|
||||||
if !user.email.empty?
|
if user.email
|
||||||
realname = realname + ' <' + user.email.to_s + '>'
|
realname = realname + ' <' + user.email.to_s + '>'
|
||||||
end
|
end
|
||||||
a = { :id => user.id, :label => realname, :value => realname }
|
a = { :id => user.id, :label => realname, :value => realname }
|
||||||
|
|
Loading…
Reference in a new issue