aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2015-12-30 13:52:38 -0200
committerRafael França <rafaelmfranca@gmail.com>2015-12-30 13:52:38 -0200
commitf390bd42b8fec6423567e782a2716bda95295f9d (patch)
treeb4c3cf659481d4297d7b44d474e3ff9cd1df654a /activerecord
parentd5a252e8333adbda1c738ab4c9896187ccc0b20c (diff)
parent8ad1eeafc2d4b0d96f0218b5272ea734564bd875 (diff)
downloadrails-f390bd42b8fec6423567e782a2716bda95295f9d.tar.gz
rails-f390bd42b8fec6423567e782a2716bda95295f9d.tar.bz2
rails-f390bd42b8fec6423567e782a2716bda95295f9d.zip
Merge pull request #22848 from derekprior/dp-postgresql-version
Make `postgresql_version` public
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index a1ec570042..e313a34c3a 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -390,12 +390,12 @@ module ActiveRecord
"average" => "avg",
}
- protected
+ # Returns the version of the connected PostgreSQL server.
+ def postgresql_version
+ @connection.server_version
+ end
- # Returns the version of the connected PostgreSQL server.
- def postgresql_version
- @connection.server_version
- end
+ protected
# See http://www.postgresql.org/docs/current/static/errcodes-appendix.html
FOREIGN_KEY_VIOLATION = "23503"