Browse files

Use `find_each` instead of `all`, since there might be a lot of users…

… and you do not want to load them all into memory. `find_each` loads them in batches of 1000.
  • Loading branch information...
1 parent 43f4611 commit 1be839f7802bb2364cdcb62916ab70b30ad9c718 @manuelmeurer manuelmeurer committed Oct 7, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1
@@ -67,7 +67,7 @@ The current docs can always be found
# If you're adding FriendlyId to an existing app and need
# to generate slugs for existing users, do this from the
# console, runner, or add a Rake task:
+ User.find_each(&:save)
## Benchmarks

0 comments on commit 1be839f

Please sign in to comment.