Unify error pages (#674)

* Unify error pages

* Start travis
This commit is contained in:
shawn-higgins1
2019-07-22 12:33:53 -04:00
committed by Jesus Federico
parent 9dd30138ba
commit ee26036105
9 changed files with 65 additions and 82 deletions

View File

@ -18,14 +18,21 @@
class ErrorsController < ApplicationController
def not_found
render status: 404, formats: :html
render "greenlight_error", status: 404, formats: :html
end
def internal_error
render status: 500, formats: :html
render "errors/greenlight_error", status: 500, formats: :html,
locals: {
status_code: 500,
message: I18n.t("errors.internal.message"),
help: I18n.t("errors.internal.help"),
display_back: true
}
end
def unauthorized
render status: 401, formats: :html
render "errors/greenlight_error", status: 401, formats: :html, locals: { status_code: 401,
message: I18n.t("errors.unauthorized.message"), help: I18n.t("errors.unauthorized.help"), display_back: true }
end
end