From 496ee0cd1b2840fcccfa2695b8489463a548cc34 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 19 May 2005 17:27:08 +0000 Subject: 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 --- actionpack/lib/action_view/helpers/form_helper.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actionpack/lib') 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 -- cgit v1.2.3