We shouldn't be matching on the `created_at` field. Causes tests to randomly fail.

This commit is contained in:
Robin Ward 2013-11-07 16:35:18 -05:00
parent dbd2332b74
commit c753a3c784
1 changed files with 1 additions and 1 deletions

View File

@ -176,7 +176,7 @@ LEFT JOIN categories c on c.id = t.category_id
def self.remove_action!(hash) def self.remove_action!(hash)
require_parameters(hash, :action_type, :user_id, :acting_user_id, :target_topic_id, :target_post_id) 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 action.destroy
MessageBus.publish("/user/#{hash[:user_id]}", {user_action_id: action.id, remove: true}) MessageBus.publish("/user/#{hash[:user_id]}", {user_action_id: action.id, remove: true})
end end