diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-13 09:05:29 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-13 09:05:29 -0800 |
commit | 3a5a01f7f6af2456acab1b662f618f326002ee5f (patch) | |
tree | 878373dc52d2cdd7d1804a9f372880ef2d9cc3be /activerecord | |
parent | 9bcfb1a9745d5fafbbd95f78df0819f2e842d2d4 (diff) | |
parent | caa21e42b831ef8fc6d6600ddc6ec37a1bb6ac1a (diff) | |
download | rails-3a5a01f7f6af2456acab1b662f618f326002ee5f.tar.gz rails-3a5a01f7f6af2456acab1b662f618f326002ee5f.tar.bz2 rails-3a5a01f7f6af2456acab1b662f618f326002ee5f.zip |
Merge pull request #5012 from waseem/alias-reconnect-mysql2
Alias reconnect! to reset! for Mysql2 adapter since they have same behavior.
Diffstat (limited to 'activerecord')
-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 = []) |