0
0
Fork 0

Improve error page layouting. 500 page has to stay static because it's

used from nginx when Rails fails.
This commit is contained in:
Eugen Rochko 2017-01-21 22:30:47 +01:00
parent b4a4eb73ae
commit e22a56183a
9 changed files with 54 additions and 132 deletions

View file

@ -51,21 +51,21 @@ class ApplicationController < ActionController::Base
def not_found
respond_to do |format|
format.any { head 404 }
format.html { render "errors/404" }
format.html { render 'errors/404', layout: 'error' }
end
end
def gone
respond_to do |format|
format.any { head 410 }
format.html { render "errors/410" }
format.html { render 'errors/410', layout: 'error' }
end
end
def unprocessable_entity
respond_to do |format|
format.any { head 422 }
format.html { render "errors/422" }
format.html { render 'errors/422', layout: 'error' }
end
end