我遵循了类似问题的解决方案。它被告知要设置 在 application_controller
中def not_found
raise ActionController::RoutingError.new('Not Found')
end
我必须设置
config.consider_all_requests_local = false
在 production.rb 文件中。然后,当我输入错误的网址时,它开始提供404页面。但将其设置为false
的一个缺点是,当出现问题时,我无法在浏览器上看到rails错误。如果不将404
设置为false
,我怎么能实现此<label ng-repeat="r in MedicalConditions track by $index">
<input ng-model="ids[$index]" type="checkbox" ng-change="valCh(r)"> {{r.conditions_name}}
</label>
例外?
答案 0 :(得分:1)
您应该将consider_all_requests_local
设置为false
,当true
时,将其设置为开发模式。
对于例外情况,您可以使用https://github.com/smartinez87/exception_notification将异常信息发送到您的电子邮件或松弛或其他..