aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-02-17 01:23:41 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-02-17 01:23:41 +0000
commitc00bf5f0c62f72f84629c6873791a591c02ae62c (patch)
tree1425ac9ed77fbc75a6ecf86e2b27b2838d28f2ec /actionpack
parent2d9e59b2b6dec7d6e98bd594cbd5295a4b6689ed (diff)
downloadrails-c00bf5f0c62f72f84629c6873791a591c02ae62c.tar.gz
rails-c00bf5f0c62f72f84629c6873791a591c02ae62c.tar.bz2
rails-c00bf5f0c62f72f84629c6873791a591c02ae62c.zip
Fixed the verbosity of using the AR store
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@639 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/session/active_record_store.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/session/active_record_store.rb b/actionpack/lib/action_controller/session/active_record_store.rb
index 27ef869132..9e0db037d0 100644
--- a/actionpack/lib/action_controller/session/active_record_store.rb
+++ b/actionpack/lib/action_controller/session/active_record_store.rb
@@ -29,8 +29,10 @@ class CGI
#
# This session's ActiveRecord database row will be created if it does not exist, or opened if it does.
def initialize(session, option=nil)
- @session = Session.find_by_sessid(session.session_id) || Session.new("sessid" => session.session_id, "data" => {})
- @data = @session.data
+ ActiveRecord::Base.silence do
+ @session = Session.find_by_sessid(session.session_id) || Session.new("sessid" => session.session_id, "data" => {})
+ @data = @session.data
+ end
end
# Update and close the session's ActiveRecord object.
@@ -56,7 +58,7 @@ class CGI
# Save session state in the session's ActiveRecord object.
def update
return unless @session
- ActiveRecord::Base.benchmark("Saving session") { @session.update_attribute "data", @data }
+ ActiveRecord::Base.silence { @session.update_attribute "data", @data }
end
end #ActiveRecordStore
end #Session