diff options
author | Brian Rose <brian@heimidal.net> | 2011-12-20 13:38:16 -0700 |
---|---|---|
committer | Brian Rose <brian@heimidal.net> | 2011-12-20 13:38:16 -0700 |
commit | a1b2dbd7d4e95fdde64a6b0529f6233efcdc99fe (patch) | |
tree | 87583ad9d55b28e81f6c67baf0c018002302b665 /actionpack/lib/action_view | |
parent | bd89946dd3ededc5850f1b9754cb39cf0331637a (diff) | |
download | rails-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')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_options_helper.rb | 2 |
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]) |