aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-12-26 23:00:31 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-12-26 23:00:31 -0300
commitceedec7edcadbad824f58e84bc2c1eddbe8539ce (patch)
tree4f74cf1de3be2a90102c4b116cc1b6a46e1c9c52 /actionpack/lib/action_view
parentb05819fd28acd069556767a99738a6fd8b0a1965 (diff)
downloadrails-ceedec7edcadbad824f58e84bc2c1eddbe8539ce.tar.gz
rails-ceedec7edcadbad824f58e84bc2c1eddbe8539ce.tar.bz2
rails-ceedec7edcadbad824f58e84bc2c1eddbe8539ce.zip
Fix collection_radio_buttons with the option `:checked` with value of
`false`
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/tags/collection_helpers.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/tags/collection_helpers.rb b/actionpack/lib/action_view/helpers/tags/collection_helpers.rb
index 4e33e79a36..e92a318c73 100644
--- a/actionpack/lib/action_view/helpers/tags/collection_helpers.rb
+++ b/actionpack/lib/action_view/helpers/tags/collection_helpers.rb
@@ -44,7 +44,8 @@ module ActionView
html_options = @html_options.dup
[:checked, :selected, :disabled].each do |option|
- next unless current_value = @options[option]
+ current_value = @options[option]
+ next if current_value.nil?
accept = if current_value.respond_to?(:call)
current_value.call(item)