From: Date: Fri, 31 Aug 2007 00:31:48 +0000 (-0400) Subject: The session storage is now done via the database, be sure to relaod your X-Git-Url: https://projects.mako.cc/source/selectricity-live/commitdiff_plain/4e41e4ab171d4d47cdac0f8676bf78d36e6eb007?ds=sidebyside The session storage is now done via the database, be sure to relaod your databases. It seems that the logout error was cured, in that if you reload the database while logged in, you shouldn't get an error when returning to the site. I don't know how the session plugin we're using will be working with the new storage method. --- diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index efbb374..f92fb98 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -1,3 +1,4 @@ +<% %>

Voters

diff --git a/config/environment.rb b/config/environment.rb index fcabdd8..82c7466 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -28,7 +28,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/create.sql b/db/create.sql index 7d5f405..c28dd36 100644 --- a/db/create.sql +++ b/db/create.sql @@ -101,6 +101,19 @@ create table rankings ( primary key (id) ); +# CREATE sessions TABLE +###################################### + +drop table if exists sessions; +create table sessions ( + id int(11) NOT NULL auto_increment, + sessid varchar(255), + data text, + updated_at datetime DEFAULT NULL, + primary key (id), + index session_index (sessid) +); + # CREATE users TABLE ##################################### #DROP TABLE IF EXISTS `users`;