Take loop out of remove_mentions
This commit is contained in:
parent
10f5d658b2
commit
305c107ba1
1 changed files with 1 additions and 3 deletions
|
|
@ -345,8 +345,6 @@ class User < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def remove_mentions
|
def remove_mentions
|
||||||
Mention.where( :person_id => self.person.id).each do |mentioned_person|
|
Mention.where( :person_id => self.person.id).delete_all
|
||||||
mentioned_person.delete
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue