Save 36% for Black Friday! Learn more

Amit Mallick

Joined

50 Experience
0 Lessons Completed
0 Questions Solved

Activity

I am using

intializers/session_store.rb
MyApp::Application.config.session_store :cookie_store, key: '_myapp_session'

config/application.rb
config.middleware.insert_before "ActionDispatch::Session::CookieStore","Rack::SSL"
config.middleware.insert_before "ActionDispatch::Cookies","Rack::SSL"

Now i want to use active_record_store for session, for which I made changes below

intializers/session_store.rb
MyApp::Application.config.session_store :active_record_store, key: '_myapp_session'
ActiveRecord::SessionStore.session_class = MyAppSession

not sure how to make configrations in config/application.rb
i want to make sure i should able to set_cookie: '_myapp_session' in response headers, fo which "ActionDispatch::Cookies" is responsible

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.