diff --git a/app/models/topic_view_item.rb b/app/models/topic_view_item.rb index 8640ca3c59e..143d22a0056 100644 --- a/app/models/topic_view_item.rb +++ b/app/models/topic_view_item.rb @@ -11,7 +11,8 @@ class TopicViewItem < ActiveRecord::Base def self.add(topic_id, ip, user_id = nil, at = nil, skip_redis = false) # Only store a view once per day per thing per (user || ip) - at ||= Date.today + at ||= Time.zone.today + redis_key = +"view:#{topic_id}:#{at}" if user_id redis_key << ":user-#{user_id}"