summaryrefslogtreecommitdiffstats
path: root/app/models/query.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-09-25 23:32:15 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-09-25 23:32:15 +0000
commit49c2f316c2a253f23aa57c412620c1c6c6432b5f (patch)
tree0391adc7cf1ddd0253ccb989ce1c864084c0de0d /app/models/query.rb
parent95fe4d61c96ad5554b9b19602dd64c94babf7664 (diff)
downloadredmine-49c2f316c2a253f23aa57c412620c1c6c6432b5f.tar.gz
redmine-49c2f316c2a253f23aa57c412620c1c6c6432b5f.zip
remove trailing white-spaces from app/models/query.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10469 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r--app/models/query.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/query.rb b/app/models/query.rb
index a557ebf14..ddf4d87d9 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -38,7 +38,7 @@ class QueryColumn
def sortable?
!@sortable.nil?
end
-
+
def sortable
@sortable.is_a?(Proc) ? @sortable.call : @sortable
end
@@ -711,10 +711,10 @@ class Query < ActiveRecord::Base
"(#{nl} #{Issue.table_name}.assigned_to_id #{sw} IN (SELECT DISTINCT #{Member.table_name}.user_id FROM #{Member.table_name}" +
" WHERE #{Member.table_name}.project_id = #{Issue.table_name}.project_id))"
when "=", "!"
- role_cond = value.any? ?
+ role_cond = value.any? ?
"#{MemberRole.table_name}.role_id IN (" + value.collect{|val| "'#{connection.quote_string(val)}'"}.join(",") + ")" :
"1=0"
-
+
sw = operator == "!" ? 'NOT' : ''
nl = operator == "!" ? "#{Issue.table_name}.assigned_to_id IS NULL OR" : ''
"(#{nl} #{Issue.table_name}.assigned_to_id #{sw} IN (SELECT DISTINCT #{Member.table_name}.user_id FROM #{Member.table_name}, #{MemberRole.table_name}" +