Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dcvezzani/5326307 to your computer and use it in GitHub Desktop.
Save dcvezzani/5326307 to your computer and use it in GitHub Desktop.
[via Rails console] Truncate selected tables using ActiveRecord.
%w[bcms_my401k_articles bcms_my401k_article_versions].each do |t|
ActiveRecord::Base.connection.execute("truncate table #{t}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment