From b3dbe07c952c1e241d2a751164b4e8c7eb7a40d9 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 9 Jan 2014 08:14:06 +0000 Subject: [PATCH] Rails4: replace deprecated find_all_by_* at FieldFormat git-svn-id: http://svn.redmine.org/redmine/trunk@12570 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/field_format.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index d0e2e4d7c..9514a984f 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -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 -- 2.39.5