diff options
author | Tadas Tamošauskas <tadastoo@yahoo.com> | 2012-01-05 22:35:10 +0000 |
---|---|---|
committer | Tadas Tamošauskas <tadastoo@yahoo.com> | 2012-01-05 22:52:13 +0000 |
commit | 9bd38f31be61af6b3b97613100d7b89e653f73a2 (patch) | |
tree | ef9dd14096eeac8d0fc4aab2395e062d3600298d /actionpack/lib | |
parent | be52f1bf2a5e250f0e2182f2b756ac68c81718f3 (diff) | |
download | rails-9bd38f31be61af6b3b97613100d7b89e653f73a2.tar.gz rails-9bd38f31be61af6b3b97613100d7b89e653f73a2.tar.bz2 rails-9bd38f31be61af6b3b97613100d7b89e653f73a2.zip |
check_box helper with :disabled => true generates disabled hidden field. fixes #1953
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 2 |
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 |