1

What kind of deprecation warnings should we expect from Rails?

About to upgrade from Rails 4.1 -> 4.2 and I'm looking in the terminal and the development.log for deprecation warnings and not seeing any. Either I'm looking in the wrong places...or I don't have any.

However, I do have an instance of File.exists? in this codebase and I know that is (was?) deprecated in favor of File.exist?. Will Rails flag this for me somewhere, as some other frameworks do, or do I need to uncover/discover these issues myself?

4

1 回答 1

3

Rails 将记录弃用 - 这是如何完成的,由config.active_support.deprecation设置 ( :log, :stderr, :raise, :silenceor :notify)控制

File.exist?虽然是一种 ruby​​ 方法,因此不受此设置的影响。如果您使用此方法,Ruby 将发出警告,尽管您需要在启用警告的情况下运行 ruby​​ 才能看到它们。

于 2015-07-18T18:13:33.370 回答