From 984312cf85d40b9fae9e88dfc80ae61f085b36d1 Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Thu, 7 Sep 2006 12:56:48 +0000 Subject: Fix a warning in prototype_helper_test, fixes #6077 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5061 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/prototype_helper.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index b6f811aee1..4318bbac4c 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -685,11 +685,9 @@ module ActionView protected def loop_on_multiple_args(method, ids) - record (if ids.size>1 - "#{javascript_object_for(ids)}.each(#{method})" - else - "#{method}(#{ids.first.to_json})" - end) + record (ids.size>1 ? + "#{javascript_object_for(ids)}.each(#{method})" : + "#{method}(#{ids.first.to_json})") end def options_for_ajax(options) -- cgit v1.2.3