我认为Rails 3.1正在改变错误发生的方式。任何人都可以协助或证实此事?我试图用Rails 3.1.0创建自定义错误页面.rc1Rails 3.1错误捕获
unless config.consider_all_requests_local
rescue_from Exception, :with => :render_error
rescue_from ActiveRecord::RecordNotFound, :with => :render_not_found
rescue_from ActionController::RoutingError, :with => :render_not_found
rescue_from ActionController::UnknownController, :with => :render_not_found
rescue_from ActionController::UnknownAction, :with => :render_not_found
end
^^这不起作用。
config.consider_all_requests_local = true
这是在我的开发环境默认情况下。我假设Rails 3.1删除了“action_controller”,但我无法在任何地方证实这一点。
谢谢!
什么样的错误?一般来说是例外吗? – Matchu 2011-05-25 04:00:11
如果您可以发布一些代码并解释您所看到的具体*意外行为,将会有所帮助。 – molf 2011-05-25 09:46:35
你应该接受下面的答案。有用! – 2011-09-29 07:59:52