Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Check for response to `#last` instead of `#first`.

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit d2abe28ed342443f8c374a6e02977ccb0c3b3f95 1 parent 55334f5
@heimidal heimidal authored josevalim committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_view/helpers/form_options_helper.rb
View
2  actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -584,7 +584,7 @@ def to_select_tag(choices, options, html_options)
# [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])
Please sign in to comment.
Something went wrong with that request. Please try again.