File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
lib/active_record/connection_adapters/sqlserver Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -325,7 +325,7 @@ def sp_executesql_types_and_parameters(binds)
325
325
end
326
326
327
327
def sp_executesql_sql_type ( attr )
328
- return "nvarchar(max)" . freeze if attr . is_a? ( Symbol )
328
+ return "nvarchar(max)" . freeze if attr . is_a? ( Symbol ) || attr . is_a? ( String )
329
329
return attr . type . sqlserver_type if attr . type . respond_to? ( :sqlserver_type )
330
330
331
331
case value = attr . value_for_database
@@ -337,7 +337,7 @@ def sp_executesql_sql_type(attr)
337
337
end
338
338
339
339
def sp_executesql_sql_param ( attr )
340
- return quote ( attr ) if attr . is_a? ( Symbol )
340
+ return quote ( attr ) if attr . is_a? ( Symbol ) || attr . is_a? ( String )
341
341
342
342
case value = attr . value_for_database
343
343
when Type ::Binary ::Data ,
You can’t perform that action at this time.
0 commit comments