From a4c640ac143786fa945be312f8db3f2827f649f0 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Sun, 25 Dec 2016 01:15:53 +0900 Subject: [PATCH] AR::ConnectionAdapters::PostgreSQL::Name#parts is called from other instances --- .../connection_adapters/postgresql/utils.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/utils.rb b/activerecord/lib/active_record/connection_adapters/postgresql/utils.rb index 56a445f086..a3f9ce6d64 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/utils.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/utils.rb @@ -34,6 +34,12 @@ def hash parts.hash end + protected + + def parts + @parts ||= [@schema, @identifier].compact + end + private def unquote(part) if part && part.start_with?('"') @@ -42,10 +48,6 @@ def unquote(part) part end end - - def parts - @parts ||= [@schema, @identifier].compact - end end module Utils # :nodoc: -- GitLab