Skip to content

Commit

Permalink
Merge pull request #143 from Edouard-chin/ec-fix-lazy-hook-backward-c…
Browse files Browse the repository at this point in the history
…ompatibility

Fix backward compatibility issue introduced by #126
  • Loading branch information
rafaelfranca authored Mar 22, 2019
2 parents d7a918c + 588d83d commit 831b0c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/active_record/session_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

module ActiveRecord
module SessionStore
autoload :Session, 'active_record/session_store/session'

module ClassMethods # :nodoc:
mattr_accessor :serializer

Expand Down Expand Up @@ -111,7 +113,6 @@ def self.dump(value)

ActiveSupport.on_load(:active_record) do
require 'active_record/session_store/session'
ActionDispatch::Session::ActiveRecordStore.session_class = ActiveRecord::SessionStore::Session
end

require 'active_record/session_store/sql_bypass'
Expand Down
2 changes: 2 additions & 0 deletions lib/active_record/session_store/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,5 @@ def raise_on_session_data_overflow!
end
end
end

ActionDispatch::Session::ActiveRecordStore.session_class = ActiveRecord::SessionStore::Session

0 comments on commit 831b0c9

Please sign in to comment.