]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace deprecated find_all_by_* at FieldFormat
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 08:14:06 +0000 (08:14 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 08:14:06 +0000 (08:14 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12570 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/field_format.rb

index d0e2e4d7cd56452de9c3a94550726025aef91234..9514a984f453f7bf6e34bc08792a14b4f78faa64 100644 (file)
@@ -578,7 +578,7 @@ module Redmine
         options = possible_values_options(custom_value.custom_field, custom_value.customized)
         missing = [custom_value.value_was].flatten.reject(&:blank?) - options.map(&:last)
         if missing.any?
-          options += target_class.find_all_by_id(missing.map(&:to_i)).map {|o| [o.to_s, o.id.to_s]}
+          options += target_class.where(:id => missing.map(&:to_i)).map {|o| [o.to_s, o.id.to_s]}
           #TODO: use #sort_by! when ruby1.8 support is dropped
           options = options.sort_by(&:first)
         end