From 50c91dede2b77c7cf925800da5abc4cfb0bc7a35 Mon Sep 17 00:00:00 2001 From: Denis Jean Date: Mon, 20 Feb 2017 14:01:00 +0100 Subject: [PATCH] Retrieve session without any implicit ordering --- lib/active_record/session_store/session.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/active_record/session_store/session.rb b/lib/active_record/session_store/session.rb index aec3253..3ce2c5b 100644 --- a/lib/active_record/session_store/session.rb +++ b/lib/active_record/session_store/session.rb @@ -48,7 +48,7 @@ def self.find_by_session_id(session_id) class << self; remove_possible_method :find_by_session_id; end def self.find_by_session_id(session_id) - where(session_id: session_id).first + where(session_id: session_id).take end end end