每次我执行测试时,都会收到这些弃用警告:
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 /Users/johnvanarkelen/Documents/Web development/rails/test-eagle/config/environment.rb:5)
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 /Users/johnvanarkelen/Documents/Web development/rails/test-eagle/config/environment.rb:5)
DEPRECATION WARNING: after_filter is deprecated and will be removed in Rails 5.1. Use after_action instead. (called from <top (required)> at /Users/johnvanarkelen/Documents/Web development/rails/test-eagle/config/environment.rb:5)
当我检查
config/environment.rb
的第5行时,有这段代码:Rails.application.initialize!
当我在我的代码库中搜索
after_action
、after_filter
或 alias_method_chain
时,找不到它们。我该怎么做才能消除这些警告?