From 18f693f9f7c1ff0a32ddda9b6ea43a4bb1fe28e1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 14 Jul 2012 08:13:55 +0000 Subject: Fixed that 200 API responses have a body containing one space (#11388). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9975 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/application_controller.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 645e8389b..98a52a834 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -520,6 +520,12 @@ class ApplicationController < ActionController::Base render_error "An error occurred while executing the query and has been logged. Please report this error to your Redmine administrator." end + # Renders a 200 response for successfull updates or deletions via the API + def render_api_ok + # head :ok would return a response body with one space + render :text => '', :status => :ok, :layout => nil + end + # Renders API response on validation failure def render_validation_errors(objects) if objects.is_a?(Array) -- cgit v1.2.3