aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2014-08-09 10:41:22 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2014-08-09 10:41:22 -0300
commit7bb5a8f59015f87291a816de0e38b840cfd9f9f0 (patch)
treea95763c962859949ff203c73bd7cde09bb4a6aa2
parentfb9d9da2cd11cf5ab4ac87279520c28661b7590b (diff)
parent8e490827d884a87a7e1c8aab39684fcf25d95634 (diff)
downloadrails-7bb5a8f59015f87291a816de0e38b840cfd9f9f0.tar.gz
rails-7bb5a8f59015f87291a816de0e38b840cfd9f9f0.tar.bz2
rails-7bb5a8f59015f87291a816de0e38b840cfd9f9f0.zip
Merge pull request #16439 from voxxit/patch-1
Using delegated connection method
-rw-r--r--activerecord/lib/active_record/tasks/postgresql_database_tasks.rb2
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)