Skip to content
Snippets Groups Projects
Commit 08b96f1b authored by Eugen Rochko's avatar Eugen Rochko
Browse files

Fix wrong HTTP status codes on error pages

parent 8c7277ac
No related branches found
No related tags found
No related merge requests found
......@@ -56,6 +56,6 @@ class AccountsController < ApplicationController
end
def check_account_suspension
head 410 if @account.suspended?
gone if @account.suspended?
end
end
......@@ -51,21 +51,21 @@ class ApplicationController < ActionController::Base
def not_found
respond_to do |format|
format.any { head 404 }
format.html { render 'errors/404', layout: 'error' }
format.html { render 'errors/404', layout: 'error', status: 404 }
end
end
def gone
respond_to do |format|
format.any { head 410 }
format.html { render 'errors/410', layout: 'error' }
format.html { render 'errors/410', layout: 'error', status: 410 }
end
end
def unprocessable_entity
respond_to do |format|
format.any { head 422 }
format.html { render 'errors/422', layout: 'error' }
format.html { render 'errors/422', layout: 'error', status: 422 }
end
end
......
......@@ -50,6 +50,6 @@ class StreamEntriesController < ApplicationController
end
def check_account_suspension
head 410 if @account.suspended?
gone if @account.suspended?
end
end
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