From 81a5e0537d00bbbfd09f0b7a46a10b75eb2c1e9b Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 23 Apr 2012 08:53:39 +0200 Subject: [PATCH] Fixed syntax error. --- app/controllers/ticket_overviews_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/ticket_overviews_controller.rb b/app/controllers/ticket_overviews_controller.rb index 5ec7048c2..941ad9215 100644 --- a/app/controllers/ticket_overviews_controller.rb +++ b/app/controllers/ticket_overviews_controller.rb @@ -445,16 +445,16 @@ class TicketOverviewsController < ApplicationController # do query user_all = User.find( :all, - :limit => limit, + :limit => limit, :conditions => ['firstname LIKE ? or lastname LIKE ? or email LIKE ?', "%#{query}%", "%#{query}%", "%#{query}%"], - :order => 'firstname' + :order => 'firstname' ) # build result list users = [] user_all.each do |user| realname = user.firstname.to_s + ' ' + user.lastname.to_s - if !user.email.empty? + if user.email realname = realname + ' <' + user.email.to_s + '>' end a = { :id => user.id, :label => realname, :value => realname }