aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-11-29 13:19:58 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-11-29 14:02:58 -0800
commitf866f66b3073aaef4140f0c9ccbb8b3df707416e (patch)
treeb70ecffaa24f6c1afd75df5f005a077db0823c75 /activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
parent79306de791ad69559c0806b376233d9d8803ac59 (diff)
downloadrails-f866f66b3073aaef4140f0c9ccbb8b3df707416e.tar.gz
rails-f866f66b3073aaef4140f0c9ccbb8b3df707416e.tar.bz2
rails-f866f66b3073aaef4140f0c9ccbb8b3df707416e.zip
expire will set in_use to false
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract_adapter.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
index deb24fd393..ce3417ad94 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -69,6 +69,7 @@ module ActiveRecord
@visitor = nil
@schema_cache = SchemaCache.new self
@in_use = false
+ @last_use = false
end
def lease
@@ -80,6 +81,10 @@ module ActiveRecord
end
end
+ def expire
+ @in_use = false
+ end
+
# Returns the human-readable name of the adapter. Use mixed case - one
# can always use downcase if needed.
def adapter_name