fix bulk revert

This commit is contained in:
r888888888
2017-11-15 10:13:13 -08:00
parent 56bf518e6d
commit d29f2f6a13
2 changed files with 5 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ module Moderator
end
def create
@bulk_revert = BulkRevert.new(@constraints)
@bulk_revert = BulkRevert.new
if params[:commit] == "Test"
@bulk_revert.preview

View File

@@ -4,7 +4,9 @@ class BulkRevert
class ConstraintTooGeneralError < Exception ; end
def process
def process(constraints)
@constraints = constraints
ModAction.log("#{CurrentUser.name} processed bulk revert for #{constraints.inspect}")
find_post_versions.order("updated_at, id").each do |version|
@@ -12,8 +14,7 @@ class BulkRevert
end
end
def initialize(constraints)
@constraints = constraints
def initialize
end
def preview