diff options
author | Joshua Delsman <voxxit@users.noreply.github.com> | 2014-08-08 22:16:28 -0700 |
---|---|---|
committer | Joshua Delsman <voxxit@users.noreply.github.com> | 2014-08-08 22:16:28 -0700 |
commit | 8e490827d884a87a7e1c8aab39684fcf25d95634 (patch) | |
tree | 7dcf04744de4d5ac54a22a7dcd0f1a1255eb8d98 | |
parent | ebcbcf97e0721c4ebd19b7c97f3e6cc3cd1aeff0 (diff) | |
download | rails-8e490827d884a87a7e1c8aab39684fcf25d95634.tar.gz rails-8e490827d884a87a7e1c8aab39684fcf25d95634.tar.bz2 rails-8e490827d884a87a7e1c8aab39684fcf25d95634.zip |
Using delegated connection method
-rw-r--r-- | activerecord/lib/active_record/tasks/postgresql_database_tasks.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb b/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb index 3d02ee07d0..ce1de4b76e 100644 --- a/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb +++ b/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb @@ -54,7 +54,7 @@ module ActiveRecord command = "pg_dump -i -s -x -O -f #{Shellwords.escape(filename)} #{search_path} #{Shellwords.escape(configuration['database'])}" raise 'Error dumping database' unless Kernel.system(command) - File.open(filename, "a") { |f| f << "SET search_path TO #{ActiveRecord::Base.connection.schema_search_path};\n\n" } + File.open(filename, "a") { |f| f << "SET search_path TO #{connection.schema_search_path};\n\n" } end def structure_load(filename) |