aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-05-19 17:27:08 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-05-19 17:27:08 +0000
commit496ee0cd1b2840fcccfa2695b8489463a548cc34 (patch)
tree18c85cc0739cb53b8ad4de12a857b30dcabff7d9 /actionpack/lib/action_view
parent47dcc5ffc68e569cad48ac18a739f24511fff0ab (diff)
downloadrails-496ee0cd1b2840fcccfa2695b8489463a548cc34.tar.gz
rails-496ee0cd1b2840fcccfa2695b8489463a548cc34.tar.bz2
rails-496ee0cd1b2840fcccfa2695b8489463a548cc34.zip
Fixed that FormHelper#checkbox should return a checked checkbox if the value is the same as checked_value #1286 [Florian Weber]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1317 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 78f3f68830..fc2621ff01 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -200,6 +200,8 @@ module ActionView
false
when Integer
value != 0
+ when String
+ value == checked_value
else
value.to_i != 0
end