Commit 3ef98122 authored by Sean McGivern's avatar Sean McGivern Committed by Alex Kalderimis

Use #ids method

parent 78d8041d
......@@ -266,7 +266,7 @@ class ActiveSession
# remove sessions if there are more than ALLOWED_NUMBER_OF_ACTIVE_SESSIONS.
destroyable_session_ids = sessions
.drop(ALLOWED_NUMBER_OF_ACTIVE_SESSIONS)
.flat_map { |session| [session.session_id, session.session_private_id].compact }
.flat_map(&:ids)
destroy_sessions(redis, user, destroyable_session_ids)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment