rich-acts_as_revisable 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -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
|