diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2015-12-30 13:52:38 -0200 |
---|---|---|
committer | Rafael França <rafaelmfranca@gmail.com> | 2015-12-30 13:52:38 -0200 |
commit | f390bd42b8fec6423567e782a2716bda95295f9d (patch) | |
tree | b4c3cf659481d4297d7b44d474e3ff9cd1df654a | |
parent | d5a252e8333adbda1c738ab4c9896187ccc0b20c (diff) | |
parent | 8ad1eeafc2d4b0d96f0218b5272ea734564bd875 (diff) | |
download | rails-f390bd42b8fec6423567e782a2716bda95295f9d.tar.gz rails-f390bd42b8fec6423567e782a2716bda95295f9d.tar.bz2 rails-f390bd42b8fec6423567e782a2716bda95295f9d.zip |
Merge pull request #22848 from derekprior/dp-postgresql-version
Make `postgresql_version` public
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 10 |
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" |