Sha256: 59f590366fd2bbfd90bbc110e4973b609d56c52647a448e9e897d57da6613239

Contents?: true

Size: 408 Bytes

Versions: 180

Compression:

Stored size: 408 Bytes

Contents

module ActionView
  module Helpers
    module Tags # :nodoc:
      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

Version data entries

180 entries across 175 versions & 13 rubygems

Version Path
actionview-4.2.11.3 lib/action_view/helpers/tags/number_field.rb
actionview-4.2.11.2 lib/action_view/helpers/tags/number_field.rb
actionview-5.1.7 lib/action_view/helpers/tags/number_field.rb
actionview-5.1.7.rc1 lib/action_view/helpers/tags/number_field.rb
actionview-5.1.6.2 lib/action_view/helpers/tags/number_field.rb
actionview-5.0.7.2 lib/action_view/helpers/tags/number_field.rb
actionview-4.2.11.1 lib/action_view/helpers/tags/number_field.rb
actionview-5.1.6.1 lib/action_view/helpers/tags/number_field.rb
actionview-5.0.7.1 lib/action_view/helpers/tags/number_field.rb
actionview-4.2.11 lib/action_view/helpers/tags/number_field.rb
actionview-5.1.6 lib/action_view/helpers/tags/number_field.rb
actionview-5.0.7 lib/action_view/helpers/tags/number_field.rb
actionview-5.1.5 lib/action_view/helpers/tags/number_field.rb
actionview-5.1.5.rc1 lib/action_view/helpers/tags/number_field.rb
actionview-4.2.10 lib/action_view/helpers/tags/number_field.rb
actionview-4.2.10.rc1 lib/action_view/helpers/tags/number_field.rb
actionview-5.1.4 lib/action_view/helpers/tags/number_field.rb
actionview-5.0.6 lib/action_view/helpers/tags/number_field.rb
actionview-5.1.4.rc1 lib/action_view/helpers/tags/number_field.rb
actionview-5.0.6.rc1 lib/action_view/helpers/tags/number_field.rb