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.1.16 lib/action_view/helpers/tags/number_field.rb
actionview-4.1.16.rc1 lib/action_view/helpers/tags/number_field.rb
actionview-4.2.7.rc1 lib/action_view/helpers/tags/number_field.rb
actionview-5.0.0 lib/action_view/helpers/tags/number_field.rb
actionview-5.0.0.rc2 lib/action_view/helpers/tags/number_field.rb
actionview-5.0.0.racecar1 lib/action_view/helpers/tags/number_field.rb
actionview-5.0.0.rc1 lib/action_view/helpers/tags/number_field.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionview-4.2.6/lib/action_view/helpers/tags/number_field.rb
actionview-5.0.0.beta4 lib/action_view/helpers/tags/number_field.rb
actionview-4.1.15 lib/action_view/helpers/tags/number_field.rb
actionview-4.2.6 lib/action_view/helpers/tags/number_field.rb
actionview-4.1.15.rc1 lib/action_view/helpers/tags/number_field.rb
actionview-4.2.6.rc1 lib/action_view/helpers/tags/number_field.rb
actionview-4.1.14.2 lib/action_view/helpers/tags/number_field.rb
actionview-4.2.5.2 lib/action_view/helpers/tags/number_field.rb
actionview-5.0.0.beta3 lib/action_view/helpers/tags/number_field.rb
actionview-5.0.0.beta2 lib/action_view/helpers/tags/number_field.rb
activejob-lock-0.0.2 rails/actionview/lib/action_view/helpers/tags/number_field.rb
actionview-5.0.0.beta1.1 lib/action_view/helpers/tags/number_field.rb
actionview-4.2.5.1 lib/action_view/helpers/tags/number_field.rb