Commit b1305d99

mo <mo.khan@gmail.com>
2017-09-08 01:55:07
return blank if the session key is nil
1 parent bd64649
Changed files (1)
app/models/user_session.rb
@@ -25,6 +25,7 @@ class UserSession < ActiveRecord::Base
 
   class << self
     def authenticate(key)
+      return nil if key.blank?
       self.active.find_by(key: key)
     end
   end