expose bulk revert interface

This commit is contained in:
r888888888
2017-03-21 14:40:06 -07:00
parent 91c21b1bac
commit 022d9ede7f
4 changed files with 31 additions and 12 deletions

View File

@@ -4,12 +4,10 @@ class BulkRevert
class ConstraintTooGeneralError < Exception ; end
def self.process(constraints)
obj = BulkRevert.new(constraints)
def process
ModAction.log("#{CurrentUser.name} processed bulk revert for #{constraints.inspect}")
obj.find_post_versions.order("updated_at, id").each do |version|
find_post_versions.order("updated_at, id").each do |version|
version.undo!
end
end