aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/tags/check_box.rb
diff options
context:
space:
mode:
authorPablo Ifran <pabloifran@gmail.com>2012-10-22 09:42:42 -0200
committerPablo Ifran <pabloifran@gmail.com>2012-10-22 09:42:42 -0200
commite041a50f2917f82950f9e5666f966d8992afd45d (patch)
tree9f4d2e3aa88f28dba9d7a1d24d46977e0642a1eb /actionpack/lib/action_view/helpers/tags/check_box.rb
parent3e6b2f5d38e0f31db3fb0fcd3bbab92666a0e3e2 (diff)
parentae27acb342c575ce19d5ad78cb13ba23f826fab1 (diff)
downloadrails-e041a50f2917f82950f9e5666f966d8992afd45d.tar.gz
rails-e041a50f2917f82950f9e5666f966d8992afd45d.tar.bz2
rails-e041a50f2917f82950f9e5666f966d8992afd45d.zip
Merge branch 'master' of https://github.com/lifo/docrails
Conflicts: activerecord/lib/active_record/callbacks.rb
Diffstat (limited to 'actionpack/lib/action_view/helpers/tags/check_box.rb')
-rw-r--r--actionpack/lib/action_view/helpers/tags/check_box.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/tags/check_box.rb b/actionpack/lib/action_view/helpers/tags/check_box.rb
index 9d17a1dde3..e21cc07746 100644
--- a/actionpack/lib/action_view/helpers/tags/check_box.rb
+++ b/actionpack/lib/action_view/helpers/tags/check_box.rb
@@ -46,10 +46,12 @@ module ActionView
false
when String
value == @checked_value
- when Array
- value.include?(@checked_value)
else
- value.to_i == @checked_value.to_i
+ if value.respond_to?(:include?)
+ value.include?(@checked_value)
+ else
+ value.to_i == @checked_value.to_i
+ end
end
end