render nothing: true has been removed from Rails

Use head instead
This commit is contained in:
gregoirenovel 2018-01-24 14:44:28 +01:00
parent 3fa9774123
commit 7ccae2c4f1
3 changed files with 4 additions and 4 deletions

View file

@ -2,9 +2,9 @@ class PingController < ApplicationController
def index
Rails.logger.silence do
if (ActiveRecord::Base.connected?)
render nothing: true, status: 200, content_type: "application/json"
head :ok
else
render nothing: true, status: 500, content_type: "application/json"
head :internal_server_error
end
end
end

View file

@ -21,7 +21,7 @@ describe NewGestionnaire::DossiersController, type: :controller do
expect(controller).to receive(:send_data)
.with('pdf content', filename: 'attestation.pdf', type: 'application/pdf') do
controller.render nothing: true
controller.head :ok
end
get :attestation, params: { procedure_id: procedure.id, dossier_id: dossier.id }

View file

@ -56,7 +56,7 @@ describe NewUser::DossiersController, type: :controller do
expect(controller).to receive(:send_data)
.with('pdf content', filename: 'attestation.pdf', type: 'application/pdf') do
controller.render nothing: true
controller.head :ok
end
get :attestation, params: { dossier_id: dossier.id }