lib/administrate/field/number.rb in administrate-0.19.0 vs lib/administrate/field/number.rb in administrate-0.20.0

- old
+ new

@@ -36,17 +36,11 @@ def format(result) formatter = options[:format][:formatter] formatter_options = options[:format][:formatter_options].to_h - case formatter - when :number_to_delimited - ActiveSupport::NumberHelper.number_to_delimited( - result, **formatter_options - ) - else - result - end + ActiveSupport::NumberHelper. + try(formatter, result, **formatter_options) || result end end end end