Rails4: replace deprecated find_all_by_* at FieldFormat
git-svn-id: http://svn.redmine.org/redmine/trunk@12570 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
6dbb9c3677
commit
b3dbe07c95
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue