From e4108fc619e0f1c28cdec6049d31f2db01d56dfd Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Fri, 17 Feb 2017 22:58:52 +0900 Subject: Make internal methods to private --- .../active_record/connection_adapters/abstract/quoting.rb | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters/abstract/quoting.rb') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb index cce8883076..f0c0fbab6c 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb @@ -61,17 +61,6 @@ module ActiveRecord lookup_cast_type(column.sql_type) end - def fetch_type_metadata(sql_type) - cast_type = lookup_cast_type(sql_type) - SqlTypeMetadata.new( - sql_type: sql_type, - type: cast_type.type, - limit: cast_type.limit, - precision: cast_type.precision, - scale: cast_type.scale, - ) - end - # Quotes a string, escaping any ' (single quote) and \ (backslash) # characters. def quote_string(s) @@ -161,6 +150,10 @@ module ActiveRecord end private + def lookup_cast_type(sql_type) + type_map.lookup(sql_type) + end + def id_value_for_database(value) if primary_key = value.class.primary_key value.instance_variable_get(:@attributes)[primary_key].value_for_database -- cgit v1.2.3