Last active
August 29, 2015 14:09
-
-
Save ewalk153/a5290069b4443426a011 to your computer and use it in GitHub Desktop.
All queries should be empty! :). This can be run on a rails 3.2.x codebase to make sure ActiveRecords is prepared for rails 4. This does NOT handle rails4 methods that have no rails 3.2 counterpart.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # no find_all_by | |
| grep -e "find_all_by" -r --include "*.rb" . | |
| # no :conditions | |
| grep -e ":conditions" -r --include "*.rb" . | |
| # no naked scopes | |
| grep -r -e "scope :" --include "*.rb" . | grep -v "lambda" | grep -v '\->' | |
| # no naked default_scopes | |
| grep -r -e "default_scope" --include "**/models/*.rb" . | grep -v "lambda" | grep -v '\->' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment