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
This commit is contained in:
Jean-Philippe Lang
2012-07-14 08:13:55 +00:00
parent 6bf60e8c20
commit 18f693f9f7
19 changed files with 48 additions and 19 deletions

View File

@@ -72,7 +72,7 @@ class GroupsController < ApplicationController
if @group.save
flash[:notice] = l(:notice_successful_update)
format.html { redirect_to(groups_path) }
format.api { head :ok }
format.api { render_api_ok }
else
format.html { render :action => "edit" }
format.api { render_validation_errors(@group) }
@@ -85,7 +85,7 @@ class GroupsController < ApplicationController
respond_to do |format|
format.html { redirect_to(groups_url) }
format.api { head :ok }
format.api { render_api_ok }
end
end
@@ -100,7 +100,7 @@ class GroupsController < ApplicationController
users.each {|user| page.visual_effect(:highlight, "user-#{user.id}") }
}
}
format.api { head :ok }
format.api { render_api_ok }
end
end
@@ -109,7 +109,7 @@ class GroupsController < ApplicationController
respond_to do |format|
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'users' }
format.js { render(:update) {|page| page.replace_html "tab-content-users", :partial => 'groups/users'} }
format.api { head :ok }
format.api { render_api_ok }
end
end