aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-01-05 15:00:26 -0800
committerJosé Valim <jose.valim@gmail.com>2012-01-05 15:00:26 -0800
commit37b4ba21cca2aa79a6ee37ea9ff926ed4d1eb7a6 (patch)
treef30009764691b39f244a5cd03ece519968fba201 /actionpack/lib
parent4d073df43d6ecd99ab04dbd0773a61559325efb8 (diff)
parent9bd38f31be61af6b3b97613100d7b89e653f73a2 (diff)
downloadrails-37b4ba21cca2aa79a6ee37ea9ff926ed4d1eb7a6.tar.gz
rails-37b4ba21cca2aa79a6ee37ea9ff926ed4d1eb7a6.tar.bz2
rails-37b4ba21cca2aa79a6ee37ea9ff926ed4d1eb7a6.zip
Merge pull request #4337 from tadast/master-checkbox_patch
check_box helper with :disabled => true generates disabled hidden field. fixes #1953 (master)
Diffstat (limited to 'actionpack/lib')
-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 1e4bebeee7..08c7fbc281 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -1091,7 +1091,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
end