Commit 218579e9a8ed0ae0cb9b522a7fb4f96860b14a75
- Diff rendering mode:
- inline
- side by side
config/environment.rb
(1 / 1)
|   | |||
| 77 | 77 | # Use the database for sessions instead of the cookie-based default, | |
| 78 | 78 | # which shouldn't be used to store highly confidential information | |
| 79 | 79 | # (create the session table with "rake db:sessions:create") | |
| 80 | # config.action_controller.session_store = :active_record_store | ||
| 80 | config.action_controller.session_store = :active_record_store | ||
| 81 | 81 | ||
| 82 | 82 | # Use SQL instead of Active Record's schema dumper when creating the test database. | |
| 83 | 83 | # This is necessary if your schema can't be completely dumped by the schema dumper, |
|   | |||
| 1 | class CreateSessions < ActiveRecord::Migration | ||
| 2 | def self.up | ||
| 3 | create_table :sessions do |t| | ||
| 4 | t.string :session_id, :null => false | ||
| 5 | t.text :data | ||
| 6 | t.timestamps | ||
| 7 | end | ||
| 8 | |||
| 9 | add_index :sessions, :session_id | ||
| 10 | add_index :sessions, :updated_at | ||
| 11 | end | ||
| 12 | |||
| 13 | def self.down | ||
| 14 | drop_table :sessions | ||
| 15 | end | ||
| 16 | end |

