Skip to content
Snippets Groups Projects
Commit afb398b5 authored by Yamagishi Kazutoshi's avatar Yamagishi Kazutoshi Committed by Eugen Rochko
Browse files

Change to always returns html document in error pages (#12214)

parent 6c60ccee
No related branches found
No related tags found
No related merge requests found
......@@ -136,9 +136,6 @@ class ApplicationController < ActionController::Base
end
def respond_with_error(code)
respond_to do |format|
format.any { head code }
format.html { render "errors/#{code}", layout: 'error', status: code }
end
render "errors/#{code}", layout: 'error', status: code
end
end
......@@ -22,11 +22,6 @@ describe ApplicationController, type: :controller do
end
shared_examples 'respond_with_error' do |code|
it "returns http #{code} for any" do
subject
expect(response).to have_http_status(code)
end
it "returns http #{code} for http" do
subject
expect(response).to have_http_status(code)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment