From b60430fe8f05eeeffb162f3b746d6cd48522b915 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 6 Oct 2016 15:42:00 +0200 Subject: [PATCH] Fix sign-in redirecting "back" to a missing image because missing static files hit the raise_not_found method --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1f991cf67..e009fb879 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -10,7 +10,7 @@ class ApplicationController < ActionController::Base rescue_from ActionController::RoutingError, with: :not_found rescue_from ActiveRecord::RecordNotFound, with: :not_found - before_action :store_current_location, unless: :devise_controller? + before_action :store_current_location, except: :raise_not_found, unless: :devise_controller? def raise_not_found raise ActionController::RoutingError, "No route matches #{params[:unmatched_route]}"