Skip to content

Commit 7523d3a

Browse files
merodriguezblancometaskills
authored andcommitted
Overwrite _type_cast method
1 parent a7f95b2 commit 7523d3a

File tree

1 file changed

+9
-0
lines changed
  • lib/active_record/connection_adapters/sqlserver

1 file changed

+9
-0
lines changed

lib/active_record/connection_adapters/sqlserver/quoting.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ def _quote(value)
6363
end
6464
end
6565

66+
def _type_cast(value)
67+
case value
68+
when ActiveRecord::Type::SQLServer::Char::Data
69+
value.to_s
70+
else
71+
super
72+
end
73+
end
74+
6675
end
6776
end
6877
end

0 commit comments

Comments
 (0)