Skip to content

Commit 0e63417

Browse files
committed
Unhack our bind executor forcing #to_i and casting.
SerializedAttributeTest#test_serialize_attribute_can_be_serialized_in_an_integer_column: NoMethodError: undefined method `to_i' for ["life"]:Array
1 parent 0449636 commit 0e63417

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lib/active_record/connection_adapters/sqlserver/database_statements.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,6 @@ def do_exec_query(sql, name, binds, options = {})
326326
next if ar_column && column.sql_type == 'timestamp'
327327
v = value
328328
names_and_types << if ar_column
329-
if column.is_integer? && value.present?
330-
v = value.to_i
331-
# Reset the casted value to the bind as required by Rails 4.1
332-
binds[index] = [column, v]
333-
end
334329
"@#{index} #{column.sql_type_for_statement}"
335330
elsif column.acts_like?(:string)
336331
"@#{index} nvarchar(max)"

0 commit comments

Comments
 (0)