Skip to content
Browse files
Extract ActiveRecord::SessionStore from Rails
This functionality will be available from gem
`active_record-session_store` instead.
  • Loading branch information
sikachu committed Aug 24, 2012
1 parent 2c571b3 commit 0ffe19056c8e8b2f9ae9d487b896cad2ce9387ad
Show file tree
Hide file tree
Showing 18 changed files with 10 additions and 947 deletions.
@@ -1,5 +1,9 @@
## Rails 4.0.0 (unreleased) ##

* `ActiveRecord::SessionStore` is extracted out of Rails into a gem `activerecord-session_store`.
Setting `config.session_store` to `:active_record_store` will no longer work and will break
if the `activerecord-session_store` gem isn't available. *Prem Sichanugrist*

* Fix select_tag when option_tags is nil.
Fixes #7404.

@@ -88,15 +88,6 @@ module ActionController
# Do not put secret information in cookie-based sessions!
# Other options for session storage:
# * ActiveRecord::SessionStore - Sessions are stored in your database, which works better than PStore with multiple app servers and,
# unlike CookieStore, hides your session contents from the user. To use ActiveRecord::SessionStore, set
# MyApplication::Application.config.session_store :active_record_store
# in your <tt>config/initializers/session_store.rb</tt> and run <tt>script/rails g session_migration</tt>.
# == Responses
# Each action results in a response, which holds the headers and document to be sent to the user's browser. The actual response

This file was deleted.

@@ -1,5 +1,8 @@
## Rails 4.0.0 (unreleased) ##

* ActiveRecord::SessionStore has been extracted from Active Record as `activerecord-session_store`
gem. Please read the `` file on the gem for the usage. *Prem Sichanugrist*

* Fix `reset_counters` when there are multiple `belongs_to` association with the
same foreign key and one of them have a counter cache.
Fixes #5200.
@@ -53,17 +53,6 @@ module ActiveRecord
autoload :ReadonlyAttributes
autoload :Reflection
autoload :Sanitization

# ActiveRecord::SessionStore depends on the abstract store in Action Pack.
# Eager loading this class would break client code that eager loads Active
# Record standalone.
# Note that the Rails application generator creates an initializer specific
# for setting the session store. Thus, albeit in theory this autoload would
# not be thread-safe, in practice it is because if the application uses this
# session store its autoload happens at boot time.
autoload :SessionStore

autoload :Schema
autoload :SchemaDumper
autoload :SchemaMigration
@@ -408,21 +408,6 @@ db_namespace = namespace :db do

namespace :sessions do
# desc "Creates a sessions migration for use with ActiveRecord::SessionStore"
task :create => [:environment, :load_config] do
raise 'Task unavailable to this database (no migration support)' unless ActiveRecord::Base.connection.supports_migrations?
require 'rails/generators/rails/session_migration/session_migration_generator'
Rails::Generators::SessionMigrationGenerator.start [ ENV['MIGRATION'] || 'add_sessions_table' ]

# desc "Clear the sessions table"
task :clear => [:environment, :load_config] do
ActiveRecord::Base.connection.execute "DELETE FROM #{ActiveRecord::SessionStore::Session.table_name}"

namespace :railties do

0 comments on commit 0ffe190

Please sign in to comment.