From 7a9d2925d7ed05d905161bd4ff3927ef3f42709d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Strza=C5=82kowski?= Date: Wed, 25 Dec 2013 23:04:20 +0100 Subject: Avoid getting redefined method warning Warning: ~/projects/rails/activerecord/lib/active_record/railtie.rb:140: warning: method redefined; discarding old extend_message ~/projects/rails/activerecord/lib/active_record/errors.rb:104: warning: previous definition of extend_message was here --- activerecord/lib/active_record/railtie.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/activerecord/lib/active_record/railtie.rb b/activerecord/lib/active_record/railtie.rb index 2c796f97e6..2a8cd83285 100644 --- a/activerecord/lib/active_record/railtie.rb +++ b/activerecord/lib/active_record/railtie.rb @@ -137,6 +137,7 @@ module ActiveRecord ActiveSupport.on_load(:active_record) do class ActiveRecord::NoDatabaseError + remove_possible_method :extend_message def extend_message(message) message << "Run `$ bin/rake db:create db:migrate` to create your database" message -- cgit v1.2.3 From dd5503377718e510e9f036261dd9877958713181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Strza=C5=82kowski?= Date: Wed, 25 Dec 2013 23:09:31 +0100 Subject: Cast env to symbol, fixes deprecation warning Warning: DEPRECATION WARNING: Passing a string to ActiveRecord::Base.establish_connection for a configuration lookup is deprecated, please pass a symbol (:development) instead. --- activerecord/lib/active_record/tasks/database_tasks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb index 06592eece2..acb7c65af5 100644 --- a/activerecord/lib/active_record/tasks/database_tasks.rb +++ b/activerecord/lib/active_record/tasks/database_tasks.rb @@ -78,7 +78,7 @@ module ActiveRecord each_current_configuration(environment) { |configuration| create configuration } - ActiveRecord::Base.establish_connection environment + ActiveRecord::Base.establish_connection(environment.to_sym) end def drop(*arguments) -- cgit v1.2.3