gitlab-org--gitlab-foss/spec/support/user_activities_helpers.rb
Rémy Coutable cfe19b795e Add a new Gitlab::UserActivities class to track user activities
This new class uses a Redis Hash instead of a Sorted Set.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-14 15:20:55 +02:00

7 lines
152 B
Ruby

module UserActivitiesHelpers
def user_activity(user)
Gitlab::UserActivities.new.
find { |k, _| k == user.id.to_s }&.
second
end
end