aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/form_options_helper.rb
diff options
context:
space:
mode:
authorBrian Rose <brian@heimidal.net>2011-12-20 13:38:16 -0700
committerBrian Rose <brian@heimidal.net>2011-12-20 13:38:16 -0700
commita1b2dbd7d4e95fdde64a6b0529f6233efcdc99fe (patch)
tree87583ad9d55b28e81f6c67baf0c018002302b665 /actionpack/lib/action_view/helpers/form_options_helper.rb
parentbd89946dd3ededc5850f1b9754cb39cf0331637a (diff)
downloadrails-a1b2dbd7d4e95fdde64a6b0529f6233efcdc99fe.tar.gz
rails-a1b2dbd7d4e95fdde64a6b0529f6233efcdc99fe.tar.bz2
rails-a1b2dbd7d4e95fdde64a6b0529f6233efcdc99fe.zip
Check for response to `#last` instead of `#first`.
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_options_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/form_options_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb
index a8690430e5..3ee0d8ebc5 100644
--- a/actionpack/lib/action_view/helpers/form_options_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -584,7 +584,7 @@ module ActionView
# [nil, []]
# { nil => [] }
#
- if !choices.empty? && choices.first.respond_to?(:first) && Array === choices.first.last
+ if !choices.empty? && choices.first.respond_to?(:last) && Array === choices.first.last
option_tags = grouped_options_for_select(choices, :selected => selected_value, :disabled => options[:disabled])
else
option_tags = options_for_select(choices, :selected => selected_value, :disabled => options[:disabled])