From d8ddb2cee412f7f0d6404253f055aedbd9b855ea Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 30 Sep 2013 09:53:57 +0000 Subject: [PATCH] remove trailing white-spaces from app/models/custom_field.rb git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12188 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/custom_field.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index f482973cf..34b9fb53d 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -267,7 +267,7 @@ class CustomField < ActiveRecord::Base "1=0" else project_key ||= "#{self.class.customized_class.table_name}.project_id" - "#{project_key} IN (SELECT DISTINCT m.project_id FROM #{Member.table_name} m" + + "#{project_key} IN (SELECT DISTINCT m.project_id FROM #{Member.table_name} m" + " INNER JOIN #{MemberRole.table_name} mr ON mr.member_id = m.id" + " INNER JOIN #{table_name_prefix}custom_fields_roles#{table_name_suffix} cfr ON cfr.role_id = mr.role_id" + " WHERE m.user_id = #{user.id} AND cfr.custom_field_id = #{id})" @@ -280,7 +280,7 @@ class CustomField < ActiveRecord::Base elsif user.anonymous? "#{table_name}.visible" else - "#{project_key} IN (SELECT DISTINCT m.project_id FROM #{Member.table_name} m" + + "#{project_key} IN (SELECT DISTINCT m.project_id FROM #{Member.table_name} m" + " INNER JOIN #{MemberRole.table_name} mr ON mr.member_id = m.id" + " INNER JOIN #{table_name_prefix}custom_fields_roles#{table_name_suffix} cfr ON cfr.role_id = mr.role_id" + " WHERE m.user_id = #{user.id} AND cfr.custom_field_id = #{id})"