删除匿名用户在缺陷中的回复
This commit is contained in:
parent
093273968b
commit
9ddb4f6683
|
@ -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
|
Loading…
Reference in New Issue