Skip to content

Instantly share code, notes, and snippets.

@mariozig
Created January 30, 2012 02:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariozig/1702164 to your computer and use it in GitHub Desktop.
Save mariozig/1702164 to your computer and use it in GitHub Desktop.
posts = Post.all
Parallel.each(posts, :in_processes => 10) do |post|
post.title = post.title.downcase
post.save!
end
# Goes with
# http://ruby.zigzo.com/2012/01/29/the-parallel-gem-and-postgresql-oh-and-rails/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment