Last active
April 25, 2022 21:03
-
-
Save bandogora/b2fbb641e161fa2d6d02b78802d319c3 to your computer and use it in GitHub Desktop.
Replace all Rails instances of `.length` with `.size`
This file contains 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
find ./app -type f -not -path './db/*' -iregex '.*.\(rb\|haml\|erb\)' -exec sed -ri 's/\.length([^_])/\.size\1/g' {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment