We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6101432 commit 06989ccCopy full SHA for 06989cc
lib/active_record/connection_adapters/sqlserver/database_statements.rb
@@ -325,7 +325,7 @@ def sp_executesql_types_and_parameters(binds)
325
end
326
327
def sp_executesql_sql_type(attr)
328
- return "nvarchar(max)".freeze if attr.is_a?(Symbol)
+ return "nvarchar(max)".freeze if attr.is_a?(Symbol) || attr.is_a?(String)
329
return attr.type.sqlserver_type if attr.type.respond_to?(:sqlserver_type)
330
331
case value = attr.value_for_database
@@ -337,7 +337,7 @@ def sp_executesql_sql_type(attr)
337
338
339
def sp_executesql_sql_param(attr)
340
- return quote(attr) if attr.is_a?(Symbol)
+ return quote(attr) if attr.is_a?(Symbol) || attr.is_a?(String)
341
342
343
when Type::Binary::Data,
0 commit comments