From 6acdf0a464d7d8a8cc591fbedbb6350d1a4c8386 Mon Sep 17 00:00:00 2001 From: Alinson Xavier Date: Sun, 6 Sep 2015 12:24:52 -0400 Subject: [PATCH] Show 404 page when attachment file cannot be found --- app/controllers/application_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 21ba92d..4456d23 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -36,6 +36,7 @@ class ApplicationController < ActionController::Base rescue_from AccessDenied, with: :deny_access rescue_from ActiveRecord::RecordInvalid, with: :reshow_form rescue_from ActiveRecord::RecordNotFound, with: :show_not_found + rescue_from ActionController::MissingFile, with: :show_not_found protected