1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
module ActionView module Helpers module Tags class NumberField < TextField #:nodoc: def render options = @options.stringify_keys if range = options.delete("in") || options.delete("within") options.update("min" => range.min, "max" => range.max) end @options = options super end end end end end