Commit 71ccba18a21009666db443fe94b0432ec00fea41

Authored by Victor Costa
1 parent 6a0c7fc6
Exists in production

Workaround for empty sessions with active record session store

Showing 1 changed file with 2 additions and 3 deletions   Show diff stats
app/models/session.rb
1 class Session < ActiveRecord::SessionStore::Session 1 class Session < ActiveRecord::SessionStore::Session
2 2
3 - # removed and redefined on super class  
4 - def self.find_by_session_id session_id  
5 - super 3 + def self.find_by_session_id(session_id)
  4 + where(session_id: session_id).all.first
6 end 5 end
7 6
8 belongs_to :user 7 belongs_to :user