diff --git a/config/environment.rb b/config/environment.rb index 50db585..97376af 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -48,7 +48,7 @@ Rails::Initializer.run do |config| # Use the database for sessions instead of the file system # (create the session table with 'rake db:sessions:create') - # config.action_controller.session_store = :active_record_store + config.action_controller.session_store = :active_record_store # Use SQL instead of Active Record's schema dumper when creating the test database. # This is necessary if your schema can't be completely dumped by the schema dumper, diff --git a/db/migrate/20130918183842_create_sessions.rb b/db/migrate/20130918183842_create_sessions.rb new file mode 100644 index 0000000..4ccc353 --- /dev/null +++ b/db/migrate/20130918183842_create_sessions.rb @@ -0,0 +1,16 @@ +class CreateSessions < ActiveRecord::Migration + def self.up + create_table :sessions do |t| + t.string :session_id, :null => false + t.text :data + t.timestamps + end + + add_index :sessions, :session_id + add_index :sessions, :updated_at + end + + def self.down + drop_table :sessions + end +end diff --git a/db/schema.rb b/db/schema.rb index 2265a57..3999c3f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,4 +1,4 @@ -# This file is auto-generated from the current state of the database. Instead of editing this file, +# This file is auto-generated from the current state of the database. Instead of editing this file, # please use the migrations feature of Active Record to incrementally modify your database, and # then regenerate this schema definition. # @@ -9,7 +9,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130711213046) do +ActiveRecord::Schema.define(:version => 20130918183842) do create_table "abuse_reports", :force => true do |t| t.integer "reporter_id" @@ -520,6 +520,16 @@ ActiveRecord::Schema.define(:version => 20130711213046) do t.integer "context_id" end + create_table "sessions", :force => true do |t| + t.string "session_id", :null => false + t.text "data" + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id" + add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at" + create_table "taggings", :force => true do |t| t.integer "tag_id" t.integer "taggable_id" diff --git a/vendor/plugins/noosfero_caching/init.rb b/vendor/plugins/noosfero_caching/init.rb index 753166f..499e6e3 100644 --- a/vendor/plugins/noosfero_caching/init.rb +++ b/vendor/plugins/noosfero_caching/init.rb @@ -62,7 +62,6 @@ end unless Rails.env.development? middleware = ActionController::Dispatcher.middleware - cookies_mw = ActionController::Session::CookieStore ActionController::Base.send(:include, NoosferoHttpCaching) - middleware.insert_before(cookies_mw, NoosferoHttpCaching::Middleware) + middleware.use NoosferoHttpCaching::Middleware end -- libgit2 0.21.2