]> source.dussan.org Git - redmine.git/commitdiff
remove trailing white-spaces from app/models/custom_field.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 12 Feb 2013 00:51:11 +0000 (00:51 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 12 Feb 2013 00:51:11 +0000 (00:51 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11354 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/custom_field.rb

index 356417c4bcf4fc26729c0e431e4c040d97c3c62b..c15192388ec212b0f996fb364f525fb459be1a42 100644 (file)
@@ -172,7 +172,7 @@ class CustomField < ActiveRecord::Base
       keyword
     end
   end
+
   # Returns a ORDER BY clause that can used to sort customized
   # objects by their value of the custom field.
   # Returns nil if the custom field can not be used for sorting.
@@ -196,7 +196,7 @@ class CustomField < ActiveRecord::Base
 
   # Returns a GROUP BY clause that can used to group by custom value
   # Returns nil if the custom field can not be used for grouping.
-  def group_statement 
+  def group_statement
     return nil if multiple?
     case field_format
       when 'list', 'date', 'bool', 'int'
@@ -342,8 +342,8 @@ class CustomField < ActiveRecord::Base
   def handle_multiplicity_change
     if !new_record? && multiple_was && !multiple
       ids = custom_values.
-        where("EXISTS(SELECT 1 FROM #{CustomValue.table_name} cve WHERE cve.custom_field_id = #{CustomValue.table_name}.custom_field_id" + 
-          " AND cve.customized_type = #{CustomValue.table_name}.customized_type AND cve.customized_id = #{CustomValue.table_name}.customized_id" + 
+        where("EXISTS(SELECT 1 FROM #{CustomValue.table_name} cve WHERE cve.custom_field_id = #{CustomValue.table_name}.custom_field_id" +
+          " AND cve.customized_type = #{CustomValue.table_name}.customized_type AND cve.customized_id = #{CustomValue.table_name}.customized_id" +
           " AND cve.id > #{CustomValue.table_name}.id)").
         pluck(:id)