rich-acts_as_revisable 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -312,7 +312,12 @@ module WithoutScope
|
|
312
312
|
# and stores it in an accessor for later saving.
|
313
313
|
def before_revisable_update #:nodoc:
|
314
314
|
return unless should_revise?
|
315
|
-
|
315
|
+
in_revision!
|
316
|
+
|
317
|
+
unless run_callbacks(:before_revise) { |r, o| r == false}
|
318
|
+
in_revision!(false)
|
319
|
+
return false
|
320
|
+
end
|
316
321
|
|
317
322
|
self.revisable_revision = self.to_revision
|
318
323
|
end
|
@@ -328,6 +333,7 @@ module WithoutScope
|
|
328
333
|
revisions.reload
|
329
334
|
run_callbacks(:after_revise)
|
330
335
|
end
|
336
|
+
in_revision!(false)
|
331
337
|
force_revision!(false)
|
332
338
|
true
|
333
339
|
end
|