From ff4f90c81ad00241040c0c2ae2be1b937abfa063 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Mon, 15 Oct 2007 08:59:48 +0000 Subject: Simple changes to bring AWS up to date with view_paths and render :text. Tests still fail though. [Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7916 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../action_web_service/dispatcher/action_controller_dispatcher.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionwebservice/lib/action_web_service/dispatcher') 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 f240dbe904..f9995197a0 100644 --- a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +++ b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb @@ -41,7 +41,7 @@ module ActionWebService # :nodoc: 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") + render :text => "#{method} not supported", :status=>500 return end exception = nil @@ -101,7 +101,7 @@ module ActionWebService # :nodoc: message = "Exception raised" backtrace = "" end - render_text("Internal protocol error: #{message}#{backtrace}", "500 Internal Protocol Error") + render :text => "Internal protocol error: #{message}#{backtrace}", :status => 500 end end @@ -158,7 +158,7 @@ module ActionWebService # :nodoc: log_error(e) unless logger.nil? end when :post - render_text('POST not supported', '500 POST not supported') + render :text => 'POST not supported', :status => 500 end end -- cgit v1.2.3