Commit 961101beb00486502a0f766eedf2d7873a311c99
Committed by
Daniela Feitosa
1 parent
08a13702
Exists in
master
and in
29 other branches
Avoid exception_notification plugin to try load 404.html
(ActionItem1837)
Showing
2 changed files
with
6 additions
and
0 deletions
Show diff stats
app/controllers/application.rb
... | ... | @@ -131,6 +131,7 @@ class ApplicationController < ActionController::Base |
131 | 131 | @path ||= request.path |
132 | 132 | render :template => 'shared/not_found.rhtml', :status => 404, :layout => get_layout |
133 | 133 | end |
134 | + alias :render_404 :render_not_found | |
134 | 135 | |
135 | 136 | def render_access_denied(message = nil, title = nil) |
136 | 137 | @no_design_blocks = true | ... | ... |
test/integration/exception_notification_test.rb
... | ... | @@ -25,4 +25,9 @@ class ExceptionNotificationTest < ActionController::IntegrationTest |
25 | 25 | assert_includes ActionMailer::Base.deliveries.map(&:to).flatten, 'admin@example.com' |
26 | 26 | assert_includes ActionMailer::Base.deliveries.map(&:to).flatten, 'user@example.com' |
27 | 27 | end |
28 | + | |
29 | + should 'render not found when try to access invalid url' do | |
30 | + get '/profile/ze/tag/notexists' | |
31 | + assert_template 'not_found.rhtml' | |
32 | + end | |
28 | 33 | end | ... | ... |