如何使用作用域修复Rails 6弃用警告?

时间:2019-05-30 22:11:33

标签: ruby-on-rails ruby-on-rails-6

在更新到Rails 6之后,我遇到了此弃用警告。我该如何解决?

argv[3]
DEPRECATION WARNING: Class level methods will no longer inherit scoping
from `install` in Rails 6.1. To continue using the scoped relation, pass
it into the block directly. To instead access the full set of models, as
Rails 6.1 will, use `Shop::Theme.unscoped`.

0 个答案:

没有答案