Permalink
Browse files

Merge branch 'master' into rails3

  • Loading branch information...
2 parents 0d3252a + 5a4e9d1 commit e6de79a3ddd9bede05a157fef77bb6761ac059a4 @shayfrendt shayfrendt committed Jun 21, 2012
@@ -57,7 +57,7 @@ def execute_after(key, &block) #:nodoc:
def branch(*args, &block)
is_branching!
- unless run_callbacks(:before_branch) { |r, o| r == false}
+ unless run_callbacks(:before_branch)
raise ActiveRecord::RecordNotSaved
end
@@ -23,11 +23,11 @@ def destroy
self.revisable_revised_at = self.revisable_deleted_at
- return false unless run_callbacks(:before_revise_on_destroy) { |r, o| r == false}
+ return false unless run_callbacks(:before_revise_on_destroy)
returning(self.save(:without_revision => true)) do
run_callbacks(:after_revise_on_destroy)
end
end
end
end
-end
+end
@@ -107,7 +107,7 @@ def find_revision(by)
def revert_to(what, *args, &block) #:yields:
is_reverting!
- unless run_callbacks(:before_revert) { |r, o| r == false}
+ unless run_callbacks(:before_revert)
raise ActiveRecord::RecordNotSaved
end
@@ -116,7 +116,7 @@ def revert_to(what, *args, &block) #:yields:
rev = find_revision(what)
self.reverting_to, self.reverting_from = rev, self
- unless rev.run_callbacks(:before_restore) { |r, o| r == false}
+ unless rev.run_callbacks(:before_restore)
raise ActiveRecord::RecordNotSaved
end
@@ -240,7 +240,7 @@ def changeset(&block)
return yield(self) if in_revision?
- unless run_callbacks(:before_changeset) { |r, o| r == false}
+ unless run_callbacks(:before_changeset)
raise ActiveRecord::RecordNotSaved
end
@@ -314,7 +314,7 @@ def before_revisable_update #:nodoc:
return unless should_revise?
in_revision!
- unless run_callbacks(:before_revise) { |r, o| r == false}
+ unless run_callbacks(:before_revise)
in_revision!(false)
return false
end

0 comments on commit e6de79a

Please sign in to comment.