Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 870cca6829cca8a2303bdcf2cbefde3c1ffbca5a 1 parent 1e6603e
@jeremy jeremy authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 actionpack/lib/action_controller/session/active_record_store.rb
View
11 actionpack/lib/action_controller/session/active_record_store.rb
@@ -35,7 +35,6 @@ class Session
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 @@ def initialize(session, option = nil)
# 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 @@ def close
# Delete and close the session store.
def delete
if @session
- @session.destroy rescue nil
+ ActiveRecord::Base.silence { @session.destroy }
@session = nil
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.