我刚刚升级到Rails 5.1.1,并收到此错误。
NoMethodError (undefined method `sanitize' for ActiveRecord::Base:Class):
堆栈可追溯到此代码
like_search_term = ActiveRecord::Base::sanitize("%#{escaped_search_term}%")
在新的Rails升级中是否已删除或更改了此方法?
最佳答案
是的,确实,它似乎是removed。
我刚刚升级到Rails 5.1.1,并收到此错误。
NoMethodError (undefined method `sanitize' for ActiveRecord::Base:Class):
like_search_term = ActiveRecord::Base::sanitize("%#{escaped_search_term}%")
最佳答案
是的,确实,它似乎是removed。