Improve error page layouting. 500 page has to stay static because it's
used from nginx when Rails fails.
This commit is contained in:
parent
b4a4eb73ae
commit
e22a56183a
9 changed files with 54 additions and 132 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue