Module: DeleteParanoid::InstanceMethods
- Defined in:
- lib/delete_paranoid.rb
Instance Method Summary collapse
-
#delete_permanently ⇒ Object
permenantly delete this specific instance from the database.
-
#destroy_permanently ⇒ Object
permanently delete this specific instance from the database.
-
#destroy_permanently! ⇒ Object
permanently delete this specific instance from the database, using the AR #destroy! method.
Instance Method Details
#delete_permanently ⇒ Object
permenantly delete this specific instance from the database
66 67 68 69 70 71 72 |
# File 'lib/delete_paranoid.rb', line 66 def delete_permanently result = delete self.class.with_deleted do self.class.delete_permanently self.id end result end |
#destroy_permanently ⇒ Object
permanently delete this specific instance from the database
49 50 51 52 53 54 55 56 |
# File 'lib/delete_paranoid.rb', line 49 def destroy_permanently result = destroy return result unless result self.class.with_deleted do self.class.delete_permanently self.id end result end |
#destroy_permanently! ⇒ Object
permanently delete this specific instance from the database, using the AR #destroy! method
58 59 60 61 62 63 64 |
# File 'lib/delete_paranoid.rb', line 58 def destroy_permanently! result = destroy! self.class.with_deleted do self.class.delete_permanently self.id end result end |