diff options
author | José Valim <jose.valim@gmail.com> | 2011-11-04 03:31:39 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-11-04 03:31:39 -0700 |
commit | 2c67845271f7bd800fa4f902e187c803ab61bb01 (patch) | |
tree | 3ae9f934f8819200fd1c1fec1cea97bef46d4007 /actionpack/lib/action_view/helpers | |
parent | 0e407a90413d8a19002b85508d811ccdf2190783 (diff) | |
parent | 56207a3f0165650abb273594f1f54fbb92bbf177 (diff) | |
download | rails-2c67845271f7bd800fa4f902e187c803ab61bb01.tar.gz rails-2c67845271f7bd800fa4f902e187c803ab61bb01.tar.bz2 rails-2c67845271f7bd800fa4f902e187c803ab61bb01.zip |
Merge pull request #3514 from waseem/remove_size_attribute_from_number_field
Remove 'size' attribute from number_field form helper fixes #3454
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index f22c466666..5c10b67586 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -1027,6 +1027,8 @@ module ActionView def to_number_field_tag(field_type, options = {}) options = options.stringify_keys + options['size'] ||= nil + if range = options.delete("in") || options.delete("within") options.update("min" => range.min, "max" => range.max) end |