删除匿名用户在缺陷中的回复

This commit is contained in:
sw 2015-09-06 16:38:24 +08:00
parent 093273968b
commit 9ddb4f6683
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
class DeleteAnonymousJour < ActiveRecord::Migration
def up
jour_count = Journal.all.count / 30 + 2
transaction do
for i in 1 ... jour_count do i
Journal.page(i).per(30).each do |jour|
jour.destroy if jour.user_id == 2
end
end
end
end
def down
end
end