aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
diff options
context:
space:
mode:
authorSebastian Martinez <sebastian@wyeworks.com>2011-04-22 12:59:05 -0300
committerSebastian Martinez <sebastian@wyeworks.com>2011-04-22 12:59:05 -0300
commit02ee2003a8040e9e8de5f3258f88dfaaade06c27 (patch)
treee94b53c1a8a50543d71e3fc46f98b48e11c1c179 /activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
parent0e2644cde043f1d7126fda0510d9961eb1692403 (diff)
downloadrails-02ee2003a8040e9e8de5f3258f88dfaaade06c27.tar.gz
rails-02ee2003a8040e9e8de5f3258f88dfaaade06c27.tar.bz2
rails-02ee2003a8040e9e8de5f3258f88dfaaade06c27.zip
Added docs for #disconnect! on adapters
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index ba7852192e..53ea80cf15 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -276,7 +276,8 @@ module ActiveRecord
super
end
- # Close the connection.
+ # Disconnects from the database if already connected. Otherwise, this
+ # method does nothing.
def disconnect!
clear_cache!
@connection.close rescue nil