Skip to content

Instantly share code, notes, and snippets.

@traumverloren
Created January 25, 2016 12:17
Show Gist options
  • Save traumverloren/93fa78495dcc2c6d457a to your computer and use it in GitHub Desktop.
Save traumverloren/93fa78495dcc2c6d457a to your computer and use it in GitHub Desktop.
How to rename a mongoid collection in 4.0.2
$ Mongoid::VERSION
=> "4.0.2"
$ Mongoid::Sessions.default[:delivery_addresses].rename(:banned_addresses)
=> {"ok"=>1.0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment