ruby-on-rails – 从gem生成的Silence弃用警告
发布时间:2020-12-16 21:37:54 所属栏目:百科 来源:网络整理
导读:我在我的Rails 5.0.0.1应用程序中使用 unscoped_associations gem. 我收到这个弃用警告: DEPRECATION WARNING: alias_method_chain is deprecated. Please,use Module#prepend instead. From module,you can access the original method using super. (call
我在我的Rails 5.0.0.1应用程序中使用
unscoped_associations gem.
我收到这个弃用警告: DEPRECATION WARNING: alias_method_chain is deprecated. Please,use Module#prepend instead. From module,you can access the original method using super. (called from <top (required)> at /home/rhl/myapp/config/application.rb:8) DEPRECATION WARNING: alias_method_chain is deprecated. Please,you can access the original method using super. (called from <top (required)> at /home/rhl/myapp/config/application.rb:8) 如何在生产环境中消除此警告? 我试过添加: config.active_support.deprecation = :silence 在production.rb 但它不起作用. 解决方法
ActiveSupport :: Deprecation.silenced = true
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |