Refactor Cookbook#deprecate search to use scopes