From e4fdec318f978a38a86b19582031b0dfae93c935 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Tue, 14 Apr 2015 23:37:40 +0300 Subject: [PATCH] #465: Skip verify_authorized for 500 and 400 errors --- app/controllers/application_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 35ff9a14c..3043b47b7 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -19,7 +19,8 @@ class ApplicationController < ActionController::Base only: [:create, :destroy, :open_id, :cancel, :publish, :change_visibility] # :update before_action :banned? after_action -> { EventLog.current_controller = nil } - after_action :verify_authorized, unless: :devise_controller? + after_action :verify_authorized, unless: :devise_controller? + skip_after_action :verify_authorized, only: %i(render_500 render_404) helper_method :get_owner