fix bulk revert
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user