【发布时间】:2012-11-17 17:33:17
【问题描述】:
我有以下代码:
unless Rails.application.config.consider_all_requests_local
rescue_from Exception, with: :render_exception
rescue_from ActiveRecord::RecordNotFound, with: :render_exception
rescue_from ActionController::UnknownController, with: :render_exception
rescue_from ::AbstractController::ActionNotFound, with: :render_exception
rescue_from ActiveRecord::ActiveRecordError, with: :render_exception
rescue_from NoMethodError, with: :render_exception
end
它们都完美无缺,除了 ::AbstractController::ActionNotFound
我也试过了
AbstractController::ActionNotFound
ActionController::UnknownAction
错误:
AbstractController::ActionNotFound (The action 'show' could not be found for ProductsController):
【问题讨论】:
标签: ruby-on-rails exception ruby-on-rails-3.2 actioncontroller