From 19be5ea877a9e58e22210673d11ee8b7344c3778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadas=20Tamo=C5=A1auskas?= Date: Thu, 5 Jan 2012 22:35:10 +0000 Subject: check_box helper with :disabled => true generates disabled hidden field. fixes #1953 --- actionpack/lib/action_view/helpers/form_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view') 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 -- cgit v1.2.3