instance method
session_store
Ruby on Rails 6.1.7.10
Since v3.0.20Signature
session_store(new_session_store = nil, **options)
No documentation comment.
Parameters
-
new_session_storeopt = nil -
optionskeyrest
Source
# File railties/lib/rails/application/configuration.rb, line 311
def session_store(new_session_store = nil, **options)
if new_session_store
if new_session_store == :active_record_store
begin
ActionDispatch::Session::ActiveRecordStore
rescue NameError
raise "`ActiveRecord::SessionStore` is extracted out of Rails into a gem. " \
"Please add `activerecord-session_store` to your Gemfile to use it."
end
end
@session_store = new_session_store
@session_options = options || {}
else
case @session_store
when :disabled
nil
when :active_record_store
ActionDispatch::Session::ActiveRecordStore
when Symbol
ActionDispatch::Session.const_get(@session_store.to_s.camelize)
else
@session_store
end
end
end
Defined in railties/lib/rails/application/configuration.rb line 311
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Application::Configuration