From 0eacdcf9a3e37e05f47a4ded7f0a4aff3b65fbe4 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 28 Jan 2007 07:16:55 +0000 Subject: Use a consistent load path to avoid double requires. Fix some scattered Ruby warnings. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/prototype_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_view/helpers/prototype_helper.rb') diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index 43d04baf8d..ed3f7b7d7f 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -860,7 +860,7 @@ module ActionView add_variable_assignment!(options[:variable]) if options[:variable] append_enumerable_function!("#{enumerable.to_s.camelize(:lower)}(#{method_args}function(#{yield_args}) {") # only yield as many params as were passed in the block - yield *options[:yield_args].collect { |p| JavaScriptVariableProxy.new(@generator, p) }[0..block.arity-1] + yield(*options[:yield_args].collect { |p| JavaScriptVariableProxy.new(@generator, p) }[0..block.arity-1]) add_return_statement! if options[:return] @generator << '});' end @@ -889,4 +889,4 @@ module ActionView end end -require File.dirname(__FILE__) + '/javascript_helper' +require 'action_view/helpers/javascript_helper' -- cgit v1.2.3