File tree Expand file tree Collapse file tree 4 files changed +6
-16
lines changed
lib/active_record/connection_adapters/abstract Expand file tree Collapse file tree 4 files changed +6
-16
lines changed Original file line number Diff line number Diff line change
1
+ * Remove deprecated support to quote ` ActiveRecord::Base ` objects.
2
+
3
+ * Rafael Mendonça França*
4
+
1
5
* Remove deprecacated support to resolve connection using ` "primary" ` as connection specification name.
2
6
3
7
* Rafael Mendonça França*
Original file line number Diff line number Diff line change @@ -9,14 +9,6 @@ module Quoting
9
9
# Quotes the column value to help prevent
10
10
# {SQL injection attacks}[https://en.wikipedia.org/wiki/SQL_injection].
11
11
def quote ( value )
12
- if value . is_a? ( Base )
13
- ActiveSupport ::Deprecation . warn ( <<~MSG )
14
- Passing an Active Record object to `quote` directly is deprecated
15
- and will be no longer quoted as id value in Rails 7.0.
16
- MSG
17
- value = value . id_for_database
18
- end
19
-
20
12
_quote ( value )
21
13
end
22
14
Original file line number Diff line number Diff line change @@ -264,14 +264,6 @@ def teardown
264
264
@connection . drop_table :datetime_primary_keys , if_exists : true
265
265
end
266
266
267
- def test_quote_ar_object
268
- value = DatetimePrimaryKey . new ( id : @time )
269
- expected = "'2017-02-14 12:34:56.789000'"
270
- assert_deprecated do
271
- assert_equal expected , @connection . quote ( value )
272
- end
273
- end
274
-
275
267
def test_type_cast_ar_object
276
268
value = DatetimePrimaryKey . new ( id : @time )
277
269
expected = @connection . type_cast ( value . id )
Original file line number Diff line number Diff line change @@ -118,6 +118,8 @@ Please refer to the [Changelog][active-record] for detailed changes.
118
118
119
119
* Remove deprecacated support to resolve connection using ` "primary"` as connection specification name.
120
120
121
+ * Remove deprecated support to quote ` ActiveRecord::Base` objects.
122
+
121
123
# ## Deprecations
122
124
123
125
# ## Notable changes
You can’t perform that action at this time.
0 commit comments