Manually apply basic before_filters in case of routing error #1248

This commit is contained in:
Holger Just 2013-03-15 15:15:10 +01:00
parent d6e5c9e1fa
commit 68e6d171b1
1 changed files with 8 additions and 1 deletions

View File

@ -54,7 +54,14 @@ class ApplicationController < ActionController::Base
# FIXME: This doesn't work with Rails >= 3.0 anymore # FIXME: This doesn't work with Rails >= 3.0 anymore
# Possible workaround: https://github.com/rails/rails/issues/671#issuecomment-1780159 # Possible workaround: https://github.com/rails/rails/issues/671#issuecomment-1780159
rescue_from ActionController::RoutingError, :with => proc{render_404} rescue_from ActionController::RoutingError, :with => proc{
# manually apply basic before_filters which aren't applied by default here
user_setup
check_if_login_required
set_localization
render_404
}
include Redmine::Search::Controller include Redmine::Search::Controller
include Redmine::MenuManager::MenuController include Redmine::MenuManager::MenuController