Commit ccc3457777d7ccd468e50c2e561c7c0e712bced1

Authored by Victor Costa
1 parent 6a0c7fc6
Exists in production

Workaround for empty sessions with active record session store

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
app/models/session.rb
1 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 + connection.clear_query_cache
  5 + where(session_id: session_id).first
6 6 end
7 7  
8 8 belongs_to :user
... ...