Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save blakerego/5439053 to your computer and use it in GitHub Desktop.
Save blakerego/5439053 to your computer and use it in GitHub Desktop.
ruby-update_all-example
Post.transaction do
Post.update_all("last_interacted_at = updated_at")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment