aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-10-23 19:25:28 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-10-23 19:25:28 +0000
commit8091ed54205a20f3756be3af0d64f98d59276c1d (patch)
treeaaa4c88d7b2f4af18eb1166b20b38eef67586734 /actionpack/lib/action_view/helpers
parentc8b6b4821ff3f8135a22728bdf989e585a38d343 (diff)
downloadrails-8091ed54205a20f3756be3af0d64f98d59276c1d.tar.gz
rails-8091ed54205a20f3756be3af0d64f98d59276c1d.tar.bz2
rails-8091ed54205a20f3756be3af0d64f98d59276c1d.zip
Disabled checkboxes don't submit a form value. Closes #9301.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8007 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-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 f25f47af62..cc81bad2b4 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -486,7 +486,7 @@ module ActionView
end
options["checked"] = "checked" if checked
add_default_name_and_id(options)
- tag("input", options) << tag("input", "name" => options["name"], "type" => "hidden", "value" => unchecked_value)
+ tag("input", options) << tag("input", "name" => options["name"], "type" => "hidden", "value" => options['disabled'] && checked ? checked_value : unchecked_value)
end
def to_date_tag()