diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-07-05 15:04:44 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-07-05 15:04:44 +0000 |
commit | 870cca6829cca8a2303bdcf2cbefde3c1ffbca5a (patch) | |
tree | 3a19e5ff9671c14087bb8acd755d7abb81dbf08c | |
parent | 1e6603e6e71e6378e1a9f88871344a60757ccd78 (diff) | |
download | rails-870cca6829cca8a2303bdcf2cbefde3c1ffbca5a.tar.gz rails-870cca6829cca8a2303bdcf2cbefde3c1ffbca5a.tar.bz2 rails-870cca6829cca8a2303bdcf2cbefde3c1ffbca5a.zip |
r2866@asus: jeremy | 2005-07-05 13:23:10 -0700
Silence ARStore session activity in the logs.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1711 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/lib/action_controller/session/active_record_store.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/session/active_record_store.rb b/actionpack/lib/action_controller/session/active_record_store.rb index 60fd295fe8..a481616615 100644 --- a/actionpack/lib/action_controller/session/active_record_store.rb +++ b/actionpack/lib/action_controller/session/active_record_store.rb @@ -35,7 +35,6 @@ class CGI class ActiveRecordStore # The default Active Record class. class Session < ActiveRecord::Base - self.table_name = 'sessions' before_save :marshal_data! before_update :data_changed? @@ -251,12 +250,16 @@ class CGI # Restore session state. The session model handles unmarshaling. def restore - @session.data if @session + if @session + @session.data + end end # Save session store. def update - @session.save! if @session + if @session + ActiveRecord::Base.silence { @session.save! } + end end # Save and close the session store. @@ -270,7 +273,7 @@ class CGI # Delete and close the session store. def delete if @session - @session.destroy rescue nil + ActiveRecord::Base.silence { @session.destroy } @session = nil end end |