Skip to content

Instantly share code, notes, and snippets.

@bandogora
Created April 25, 2022 17:09
Show Gist options
  • Save bandogora/a762f3a5d200ecc1e2c5f55df8206842 to your computer and use it in GitHub Desktop.
Save bandogora/a762f3a5d200ecc1e2c5f55df8206842 to your computer and use it in GitHub Desktop.
Replace all Rails instances of `.count` with `.size`
find . -type f -not -path './db/*' -iregex '.*.\(rb\|haml\|erb\)' -exec sed -ri 's/(\.count)/\.size/g' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment