Sha256: 126d53679acfbb6cb2675cb27d49c1f17795e6d1ac8d927dd43389c07cb55b0f
Contents?: true
Size: 749 Bytes
Versions: 1
Compression:
Stored size: 749 Bytes
Contents
# Mongoid::Archivable Moves Mongoid documents to an archive instead of destroying them. ## Installation Add this line to your application's Gemfile: ```ruby gem 'mongoid-archivable' ``` And then execute: $ bundle Or install it yourself as: $ gem install mongoid-archivable ## Usage In any Mongoid document, do this: ``` include Mongoid::Archivable ``` Now a `destroy` of a document will move the document to an Archive collection, namespaced under the document you're destroying. ## Example ``` user = User.create! name: "Example User" user.destroy User.count # => 0 User::Archive.count # => 1 ``` ## Development Please report any issues to the [GitHub issue tracker](https://github.com/Sign2Pay/mongoid-archivable/issues).
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongoid-archivable-1.0.0 | README.md |