diff options
author | Brian Rose <brian@heimidal.net> | 2011-12-20 13:38:16 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-12-20 22:51:19 +0100 |
commit | d2abe28ed342443f8c374a6e02977ccb0c3b3f95 (patch) | |
tree | 7d74ad5532c7c6beef468b332af8032a8293f049 /actionpack/lib/action_view | |
parent | 55334f52d49630bf73ce06e4f4ec4682a7fe566a (diff) | |
download | rails-d2abe28ed342443f8c374a6e02977ccb0c3b3f95.tar.gz rails-d2abe28ed342443f8c374a6e02977ccb0c3b3f95.tar.bz2 rails-d2abe28ed342443f8c374a6e02977ccb0c3b3f95.zip |
Check for response to `#last` instead of `#first`.
Signed-off-by: José Valim <jose.valim@gmail.com>
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]) |