diff options
Diffstat (limited to 'actionwebservice/lib')
-rw-r--r-- | actionwebservice/lib/action_web_service.rb | 6 | ||||
-rw-r--r-- | actionwebservice/lib/action_web_service/dispatcher/abstract.rb | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/actionwebservice/lib/action_web_service.rb b/actionwebservice/lib/action_web_service.rb index 2865dff633..61e451b704 100644 --- a/actionwebservice/lib/action_web_service.rb +++ b/actionwebservice/lib/action_web_service.rb @@ -27,9 +27,9 @@ begin require 'active_record' rescue LoadError require 'rubygems' - require_gem 'activesupport', '>= 0.9.0' - require_gem 'actionpack', '>= 1.4.0' - require_gem 'activerecord', '>= 1.6.0' + require_gem 'activesupport', '>= 1.0.2' + require_gem 'actionpack', '>= 1.6.0' + require_gem 'activerecord', '>= 1.9.0' end $:.unshift(File.dirname(__FILE__) + "/action_web_service/vendor/") diff --git a/actionwebservice/lib/action_web_service/dispatcher/abstract.rb b/actionwebservice/lib/action_web_service/dispatcher/abstract.rb index 1df03d1777..b63fe65ce1 100644 --- a/actionwebservice/lib/action_web_service/dispatcher/abstract.rb +++ b/actionwebservice/lib/action_web_service/dispatcher/abstract.rb @@ -34,7 +34,12 @@ module ActionWebService # :nodoc: def web_service_direct_invoke(invocation) @method_params = invocation.method_ordered_params - return_value = self.__send__(invocation.api_method_name) + arity = method(invocation.api_method_name).arity rescue 0 + if arity < 0 || arity > 0 + return_value = self.__send__(invocation.api_method_name, *@method_params) + else + return_value = self.__send__(invocation.api_method_name) + end if invocation.api.has_api_method?(invocation.api_method_name) returns = invocation.returns ? invocation.returns[0] : nil else |