I just upgraded to Rails 5.1.1 and am receiving this error.
NoMethodError (undefined method `sanitize' for ActiveRecord::Base:Class):
The stack traces back to this code
like_search_term = ActiveRecord::Base::sanitize("%#{escaped_search_term}%")
Has this method been removed or changed in the new Rails upgrade?