From 5a960d2568b5c2f69c31379045a224489a5ac3d1 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 9 May 2006 05:19:32 +0000 Subject: Excise ingrown code from FormOptionsHelper#options_for_select. Closes #5008. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4331 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/form_options_helper.rb | 2 -- 1 file changed, 2 deletions(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb index 4c830afb02..12a5f7f0f1 100644 --- a/actionpack/lib/action_view/helpers/form_options_helper.rb +++ b/actionpack/lib/action_view/helpers/form_options_helper.rb @@ -113,7 +113,6 @@ module ActionView options_for_select = container.inject([]) do |options, element| if !element.is_a?(String) and element.respond_to?(:first) and element.respond_to?(:last) - is_selected = ( (selected.respond_to?(:include?) ? selected.include?(element.last) : element.last == selected) ) is_selected = ( (selected.respond_to?(:include?) && !selected.is_a?(String) ? selected.include?(element.last) : element.last == selected) ) if is_selected options << "" @@ -121,7 +120,6 @@ module ActionView options << "" end else - is_selected = ( (selected.respond_to?(:include?) ? selected.include?(element) : element == selected) ) is_selected = ( (selected.respond_to?(:include?) && !selected.is_a?(String) ? selected.include?(element) : element == selected) ) options << ((is_selected) ? "" : "") end -- cgit v1.2.3