diff options
author | Waseem Ahmad <talk.to.waseem@gmail.com> | 2012-02-12 12:05:39 +0530 |
---|---|---|
committer | Waseem Ahmad <talk.to.waseem@gmail.com> | 2012-02-12 12:07:45 +0530 |
commit | caa21e42b831ef8fc6d6600ddc6ec37a1bb6ac1a (patch) | |
tree | 64b77e4ed52e3274a3312fbf95c0ea997cc8ad16 | |
parent | d822a651c29fa15a6ef023c8bda42b913616813d (diff) | |
download | rails-caa21e42b831ef8fc6d6600ddc6ec37a1bb6ac1a.tar.gz rails-caa21e42b831ef8fc6d6600ddc6ec37a1bb6ac1a.tar.bz2 rails-caa21e42b831ef8fc6d6600ddc6ec37a1bb6ac1a.zip |
Alias reconnect! to reset! for Mysql2 adapter since they have same
behavior.
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb index c1332fde1a..321d500da2 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb @@ -80,6 +80,7 @@ module ActiveRecord disconnect! connect end + alias :reset! :reconnect! # Disconnects from the database if already connected. # Otherwise, this method does nothing. @@ -90,11 +91,6 @@ module ActiveRecord end end - def reset! - disconnect! - connect - end - # DATABASE STATEMENTS ====================================== def explain(arel, binds = []) |