aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-03-19 02:22:06 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-03-19 02:28:09 +0900
commit98d0f93506b0b97804d0d510ffcc435af9b2a2d5 (patch)
tree7c3b4e8a96e0f729cd62194e54bf30884d7b8202 /activerecord
parent0e94a513feb30b382946bef0855869c366a733e9 (diff)
downloadrails-98d0f93506b0b97804d0d510ffcc435af9b2a2d5.tar.gz
rails-98d0f93506b0b97804d0d510ffcc435af9b2a2d5.tar.bz2
rails-98d0f93506b0b97804d0d510ffcc435af9b2a2d5.zip
Don't expose internal `type_casted_binds` method
Internal usage for the method as public has removed at #29623.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/quoting.rb14
-rw-r--r--activerecord/test/cases/bind_parameter_test.rb2
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(