Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: session store from issue #57 #64

Merged
merged 2 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ gem 'omniauth_openid_connect'

gem "wicked_pdf", "~> 2.1"

gem 'activerecord-session_store'

group :development, :test do
gem "byebug", "~> 11.0", platform: :mri

gem "brakeman"
gem "decidim-dev", ENV.fetch("DECIDIM_VERSION", "0.27.3")
gem "decidim-dev", ENV.fetch("DECIDIM_VERSION", "0.27.5")
end

group :development do
Expand Down
1 change: 1 addition & 0 deletions config/initializers/session_store.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rails.application.config.session_store :active_record_store, :key => '_decidim_session'
12 changes: 12 additions & 0 deletions db/migrate/20240118083525_add_sessions_table.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class AddSessionsTable < ActiveRecord::Migration[6.1]
def change
create_table :sessions do |t|
t.string :session_id, :null => false
t.text :data
t.timestamps
end

add_index :sessions, :session_id, :unique => true
add_index :sessions, :updated_at
end
end
Loading