Skip to content

guard_against_physical_delete is monkey patch for ActiveRecord. This patch prevent deleting record physically.

License

Notifications You must be signed in to change notification settings

kufu-ai/guard_against_physical_delete

 
 

Repository files navigation

guard_against_physical_delete

guard_against_physical_delete is monkey patch for ActiveRecord. This patch prevent deleting record physically. set logical delete column name. (default is :deleted_at)

Logical.logical_delete_column = :removed_at
Logical.first.delete #=> raise GuardAgainstPhysicalDelete::PhysicalDeleteError
Logical.physical_delete { Logical.first.delete } #=> allow physical_delete

Support

active_record 3.0.10, >= 3.2

Copyright © 2012 morita shingo. See License.txt for further details.

About

guard_against_physical_delete is monkey patch for ActiveRecord. This patch prevent deleting record physically.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%