From e0aadf12e3e6f3e98609bcc51e2428cf3843cfd3 Mon Sep 17 00:00:00 2001 From: Vasiliy Ermolovich Date: Sat, 5 May 2012 20:34:06 +0300 Subject: check checkboxes with array of strings as :checked option --- actionpack/lib/action_view/helpers/tags/collection_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/tags/collection_helpers.rb b/actionpack/lib/action_view/helpers/tags/collection_helpers.rb index 6a1479069f..4e33e79a36 100644 --- a/actionpack/lib/action_view/helpers/tags/collection_helpers.rb +++ b/actionpack/lib/action_view/helpers/tags/collection_helpers.rb @@ -49,7 +49,7 @@ module ActionView accept = if current_value.respond_to?(:call) current_value.call(item) else - Array(current_value).include?(value) + Array(current_value).map(&:to_s).include?(value.to_s) end if accept -- cgit v1.2.3