Report.user_id is dependent on :destroy-- no need to iterate over it again

This commit is contained in:
Yuki 2015-04-30 05:42:17 +05:30
parent 563293be44
commit 832dc1c1e4
1 changed files with 0 additions and 8 deletions

View File

@ -68,14 +68,6 @@ class User < ActiveRecord::Base
r.save
end
end
rep = Report.where(user_id: self.id)
rep.each do |r|
unless r.nil?
r.deleted = true
r.save
end
end
end
def login=(login)