Skip to content

Commit d9d09b0

Browse files
author
Aidan Haran
committed
Fix when quoting ActiveModel::Attribute
1 parent 4d0de64 commit d9d09b0

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- [#879](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/879) Added visit method for HomogeneousIn
1111
- [#880](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/880) Handle any default column class when deduplicating
1212
- [#861](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/861) Fix Rails 6.1 database config
13+
- [#885](https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/885) Fix when quoting ActiveModel::Attribute
1314

1415
#### Changed
1516

lib/active_record/connection_adapters/sqlserver/quoting.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ def _quote(value)
118118
value.quoted
119119
when String, ActiveSupport::Multibyte::Chars
120120
"#{QUOTED_STRING_PREFIX}#{super}"
121+
when ActiveModel::Attribute
122+
quote(value.value_for_database)
121123
else
122124
super
123125
end

0 commit comments

Comments
 (0)