Patient.all.delete_all
Seaborg opened this issue · comments
You can still delete objects like so:
Patient.all.delete_all
Thanks! Yes, I patched the relation similarly to what would be needed in:
https://github.com/garysweaver/mark_only/blob/v0.0.2/lib/mark_only.rb
but a gem that has spent more time on the topic is paranoia:
https://github.com/rubysherpas/paranoia/blob/v2.1.4/lib/paranoia.rb
that I'd like to try to catch up to date on when I get time.
If you have time to setup tests and PR for this fix, that would be great.
I recently got Appraisal and tests setup for mark_only (though a bit messy) if you want an example (be_read_only wouldn't need to be as complicated):
https://github.com/garysweaver/mark_only/tree/v0.0.2