From 98d0f93506b0b97804d0d510ffcc435af9b2a2d5 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Tue, 19 Mar 2019 02:22:06 +0900 Subject: Don't expose internal `type_casted_binds` method Internal usage for the method as public has removed at #29623. --- .../active_record/connection_adapters/abstract/quoting.rb | 14 +++++++------- activerecord/test/cases/bind_parameter_test.rb | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb index eefe621feb..9d24d839c1 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb @@ -138,15 +138,15 @@ module ActiveRecord "'#{quote_string(value.to_s)}'" end - def type_casted_binds(binds) # :nodoc: - if binds.first.is_a?(Array) - binds.map { |column, value| type_cast(value, column) } - else - binds.map { |attr| type_cast(attr.value_for_database) } + private + def type_casted_binds(binds) + if binds.first.is_a?(Array) + binds.map { |column, value| type_cast(value, column) } + else + binds.map { |attr| type_cast(attr.value_for_database) } + end end - end - private def lookup_cast_type(sql_type) type_map.lookup(sql_type) end diff --git a/activerecord/test/cases/bind_parameter_test.rb b/activerecord/test/cases/bind_parameter_test.rb index eb8b45431f..85685d1d00 100644 --- a/activerecord/test/cases/bind_parameter_test.rb +++ b/activerecord/test/cases/bind_parameter_test.rb @@ -184,7 +184,7 @@ if ActiveRecord::Base.connection.prepared_statements name: "SQL", sql: "select * from topics where id = ?", binds: binds, - type_casted_binds: @connection.type_casted_binds(binds) + type_casted_binds: @connection.send(:type_casted_binds, binds) } event = ActiveSupport::Notifications::Event.new( -- cgit v1.2.3