aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorTadas Tamošauskas <tadastoo@yahoo.com>2012-01-05 22:35:10 +0000
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-01-27 10:06:44 -0200
commit19be5ea877a9e58e22210673d11ee8b7344c3778 (patch)
tree63efd117fa6cb934402c1c4a6560afd3d95f8bff /actionpack/lib/action_view
parent1c5bd8a33dd7002c8664e587f968830c1bce3ff8 (diff)
downloadrails-19be5ea877a9e58e22210673d11ee8b7344c3778.tar.gz
rails-19be5ea877a9e58e22210673d11ee8b7344c3778.tar.bz2
rails-19be5ea877a9e58e22210673d11ee8b7344c3778.zip
check_box helper with :disabled => true generates disabled hidden field. fixes #1953
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index ffb5a729ed..fa2ebf881c 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -1092,7 +1092,7 @@ module ActionView
else
add_default_name_and_id(options)
end
- hidden = tag("input", "name" => options["name"], "type" => "hidden", "value" => options['disabled'] && checked ? checked_value : unchecked_value)
+ hidden = tag("input", "name" => options["name"], "type" => "hidden", "value" => unchecked_value, "disabled" => options["disabled"])
checkbox = tag("input", options)
(hidden + checkbox).html_safe
end