Skip to content

Commit

Permalink
Converted to ActiveRecord sessions store.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislloyd authored and xaviershay committed Feb 21, 2008
1 parent d2e759c commit 0515cfb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (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,
Expand Down
16 changes: 16 additions & 0 deletions db/migrate/006_create_sessions.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0515cfb

Please sign in to comment.