From c753a3c7849a76b2e5f41e88b9b8dd3b4dc1afd0 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 7 Nov 2013 16:35:18 -0500 Subject: [PATCH] We shouldn't be matching on the `created_at` field. Causes tests to randomly fail. --- app/models/user_action.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user_action.rb b/app/models/user_action.rb index 69765c17087..0d64a6c8a39 100644 --- a/app/models/user_action.rb +++ b/app/models/user_action.rb @@ -176,7 +176,7 @@ LEFT JOIN categories c on c.id = t.category_id def self.remove_action!(hash) require_parameters(hash, :action_type, :user_id, :acting_user_id, :target_topic_id, :target_post_id) - if action = UserAction.where(hash).first + if action = UserAction.where(hash.except(:created_at)).first action.destroy MessageBus.publish("/user/#{hash[:user_id]}", {user_action_id: action.id, remove: true}) end