1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-23 17:01:13 +00:00

Column 'address' in where clause may be ambiguous (#19485).

git-svn-id: http://svn.redmine.org/redmine/trunk@14284 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2015-05-30 08:23:03 +00:00
parent c89fa2be57
commit b688214ce0

View File

@ -130,7 +130,7 @@ class User < Principal
scope :having_mail, lambda {|arg| scope :having_mail, lambda {|arg|
addresses = Array.wrap(arg).map {|a| a.to_s.downcase} addresses = Array.wrap(arg).map {|a| a.to_s.downcase}
if addresses.any? if addresses.any?
joins(:email_addresses).where("LOWER(address) IN (?)", addresses).uniq joins(:email_addresses).where("LOWER(#{EmailAddress.table_name}.address) IN (?)", addresses).uniq
else else
none none
end end