kkorach-acts_as_revisable 0.9.8 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,7 @@ module FatJam
|
|
4
4
|
def self.included(base)
|
5
5
|
base.instance_eval do
|
6
6
|
alias_method_chain :destroy, :revisable
|
7
|
+
define_callbacks :before_destroy_with_revisable, :after_destroy_with_revisable
|
7
8
|
end
|
8
9
|
end
|
9
10
|
|
@@ -22,7 +23,9 @@ module FatJam
|
|
22
23
|
end
|
23
24
|
|
24
25
|
self.revisable_revised_at = self.revisable_deleted_at
|
26
|
+
run_callbacks(:before_destroy_with_revisable)
|
25
27
|
self.save(:without_revision => true)
|
28
|
+
run_callbacks(:after_destroy_with_revisable)
|
26
29
|
end
|
27
30
|
end
|
28
31
|
end
|