diff options
Diffstat (limited to 'actionwebservice/lib/action_web_service/dispatcher')
-rw-r--r-- | actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb index 9c16c50248..f240dbe904 100644 --- a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +++ b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb @@ -38,8 +38,8 @@ module ActionWebService # :nodoc: private def dispatch_web_service_request method = request.method.to_s.upcase - allowed_methods = self.class.web_service_api ? (self.class.web_service_api.allowed_http_methods.dup || []) : [ :post ] - allowed_methods.map!{|m| m.to_s.upcase } + allowed_methods = self.class.web_service_api ? (self.class.web_service_api.allowed_http_methods || []) : [ :post ] + allowed_methods = allowed_methods.map{|m| m.to_s.upcase } if !allowed_methods.include?(method) render_text("#{method} not supported", "500 #{method} not supported") return |