{"id":20547458,"url":"https://github.com/mshahzadtariq/persistable_mongoid","last_synced_at":"2026-04-07T22:31:25.249Z","repository":{"id":33013656,"uuid":"36647497","full_name":"mshahzadtariq/persistable_mongoid","owner":"mshahzadtariq","description":"Persist Deleted Records for Mongoid Soft delete functionality for Mongoid ORM so you may recover records at later stage.","archived":false,"fork":false,"pushed_at":"2015-06-30T11:01:52.000Z","size":216,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T23:31:05.118Z","etag":null,"topics":["gem","mongodb","orm","persistable","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mshahzadtariq.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-01T08:24:41.000Z","updated_at":"2018-10-01T12:14:43.000Z","dependencies_parsed_at":"2022-09-12T11:01:03.415Z","dependency_job_id":null,"html_url":"https://github.com/mshahzadtariq/persistable_mongoid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mshahzadtariq/persistable_mongoid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mshahzadtariq%2Fpersistable_mongoid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mshahzadtariq%2Fpersistable_mongoid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mshahzadtariq%2Fpersistable_mongoid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mshahzadtariq%2Fpersistable_mongoid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mshahzadtariq","download_url":"https://codeload.github.com/mshahzadtariq/persistable_mongoid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mshahzadtariq%2Fpersistable_mongoid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31532187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gem","mongodb","orm","persistable","ruby","ruby-on-rails"],"created_at":"2024-11-16T02:08:23.459Z","updated_at":"2026-04-07T22:31:25.234Z","avatar_url":"https://github.com/mshahzadtariq.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Mongoid Persistable \nPersist Deleted Records for Mongoid\nSoft delete functionality for Mongoid ORM so you may recover records at later stage.\n\n== Installation\n\nAdd following line to your Gemfile\n\n    gem 'persistable_mongoid'\n\n  or\n\n    gem 'persistable_mongoid', git: 'https://github.com/mshahzadtariq/persistable_mongoid'\n\n  or\n\n    gem install persistable_mongoid\n\nAnd include this module to the model for which you want to enable soft delete and recovery feature\n\n    class MyModel\n      include Mongoid::Document\n      include MST::Persistable\n      \n      ......\n      \n    end\n    \nand that is all. \n\n== Usage\n\nPersist sensitive data with options to recover data.\n    \nTo persist record, call destroy method on object. It will not delete record from database but persist that so you can recover it in the future if required. \n    \n    object.destroy\n    \nIt also has two scopes\n\nonly_deleted: Fetch only deleted records of that particular model\ne.g\n\n    Model.only_deleted\n    \nwith_deleted: Fetch all records of that particular model including deleted records\ne.g\n\n    Model.with_deleted\n    \n\nTo recover records, call recover method on object\n\n    Model.only_deleted.first.recover\n\nTo permanently delete record from system/database, call delete method\n\n    object.delete\n\n== Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Added some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmshahzadtariq%2Fpersistable_mongoid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmshahzadtariq%2Fpersistable_mongoid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmshahzadtariq%2Fpersistable_mongoid/lists"}