File tree Expand file tree Collapse file tree 4 files changed +6
-27
lines changed Expand file tree Collapse file tree 4 files changed +6
-27
lines changed Original file line number Diff line number Diff line change
1
+ * Remove deprecated ` ActiveRecord::Result#map! ` and ` ActiveRecord::Result#collect! ` .
2
+
3
+ * Rafael Mendonça França*
4
+
1
5
* Remove deprecated ` ActiveRecord::Base.configurations.to_h ` .
2
6
3
7
* Rafael Mendonça França*
Original file line number Diff line number Diff line change @@ -72,11 +72,6 @@ def each(&block)
72
72
end
73
73
end
74
74
75
- alias :map! :map
76
- alias :collect! :map
77
- deprecate "map!" : :map
78
- deprecate "collect!" : :map
79
-
80
75
# Returns true if there are no records, otherwise false.
81
76
def empty?
82
77
rows . empty?
Original file line number Diff line number Diff line change @@ -12,28 +12,6 @@ def result
12
12
] )
13
13
end
14
14
15
- test "map! is deprecated" do
16
- assert_deprecated do
17
- result . map! { nil }
18
- end
19
- assert_equal [
20
- { "col_1" => "row 1 col 1" , "col_2" => "row 1 col 2" } ,
21
- { "col_1" => "row 2 col 1" , "col_2" => "row 2 col 2" } ,
22
- { "col_1" => "row 3 col 1" , "col_2" => "row 3 col 2" } ,
23
- ] , result . to_a
24
- end
25
-
26
- test "collect! is deprecated" do
27
- assert_deprecated do
28
- result . collect! { nil }
29
- end
30
- assert_equal [
31
- { "col_1" => "row 1 col 1" , "col_2" => "row 1 col 2" } ,
32
- { "col_1" => "row 2 col 1" , "col_2" => "row 2 col 2" } ,
33
- { "col_1" => "row 3 col 1" , "col_2" => "row 3 col 2" } ,
34
- ] , result . to_a
35
- end
36
-
37
15
test "includes_column?" do
38
16
assert result . includes_column? ( "col_1" )
39
17
assert_not result . includes_column? ( "foo" )
Original file line number Diff line number Diff line change @@ -262,6 +262,8 @@ Please refer to the [Changelog][active-job] for detailed changes.
262
262
263
263
* Remove deprecated ` ActiveRecord::Base.configurations.to_h` .
264
264
265
+ * Remove deprecated ` ActiveRecord::Result#map!` and ` ActiveRecord::Result#collect!` .
266
+
265
267
# ## Deprecations
266
268
267
269
* Deprecated ` Rails.config.active_job.skip_after_callbacks_if_terminated` .
You can’t perform that action at this time.
0 commit comments