mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
Fix all the errors to get our tests green on Rails 5.1.
This commit is contained in:
@@ -61,8 +61,13 @@ class PostTiming < ActiveRecord::Base
|
||||
|
||||
def self.destroy_for(user_id, topic_ids)
|
||||
PostTiming.transaction do
|
||||
PostTiming.delete_all(['user_id = ? and topic_id in (?)', user_id, topic_ids])
|
||||
TopicUser.delete_all(['user_id = ? and topic_id in (?)', user_id, topic_ids])
|
||||
PostTiming
|
||||
.where('user_id = ? and topic_id in (?)', user_id, topic_ids)
|
||||
.delete_all
|
||||
|
||||
TopicUser
|
||||
.where('user_id = ? and topic_id in (?)', user_id, topic_ids)
|
||||
.delete_all
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user