diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-19 17:27:08 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-19 17:27:08 +0000 |
commit | 496ee0cd1b2840fcccfa2695b8489463a548cc34 (patch) | |
tree | 18c85cc0739cb53b8ad4de12a857b30dcabff7d9 /actionpack/lib/action_view/helpers/form_helper.rb | |
parent | 47dcc5ffc68e569cad48ac18a739f24511fff0ab (diff) | |
download | rails-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/helpers/form_helper.rb')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 2 |
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 |