summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2009-12-12 06:18:40 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2009-12-12 06:18:40 +0000
commit7959101288c08181e0a66e56d3047283359b8f0e (patch)
treebd3f0b93731944f3b26ab60279cde20ae7325554 /app
parent4fe14e71c2d76a2e92da0aaa71e18493d65b1fc1 (diff)
downloadredmine-7959101288c08181e0a66e56d3047283359b8f0e.tar.gz
redmine-7959101288c08181e0a66e56d3047283359b8f0e.zip
Search mail addresses in Principal#like
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3152 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/principal.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/principal.rb b/app/models/principal.rb
index f83cdd0a8..ff9b6866c 100644
--- a/app/models/principal.rb
+++ b/app/models/principal.rb
@@ -27,8 +27,8 @@ class Principal < ActiveRecord::Base
named_scope :like, lambda {|q|
s = "%#{q.to_s.strip.downcase}%"
- {:conditions => ["LOWER(login) LIKE ? OR LOWER(firstname) LIKE ? OR LOWER(lastname) LIKE ?", s, s, s],
- :order => 'type, login, lastname, firstname'
+ {:conditions => ["LOWER(login) LIKE ? OR LOWER(firstname) LIKE ? OR LOWER(lastname) LIKE ? OR LOWER(mail) LIKE ?", s, s, s, s],
+ :order => 'type, login, lastname, firstname, mail'
}
}