From 07e9b02a36b12762210062afef15632b3a7564e2 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Mon, 16 Apr 2018 22:45:59 +0200 Subject: Try to fix session mess by making data and session_id mass assignable. --- config/initializers/session_store.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 1b9705c..7e1f190 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -4,3 +4,8 @@ # which shouldn't be used to store highly confidential information # (create the session table with "rails generate session_migration") BetaWebApp::Application.config.session_store :active_record_store + +# Make the data and session_id columns mass-assignable, +# hopefully fends off nasty session bugs, +# source: https://github.com/rails/activerecord-session_store/issues/6#issuecomment-26214581 +ActiveRecord::SessionStore::Session.attr_accessible :data, :session_id -- cgit v1.2.3