aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/CHANGELOG.md21
1 files changed, 15 insertions, 6 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 26f5aa2c73..4845150a24 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,18 @@
+* Create a whitelist of delegable methods to `Array`.
+
+ Currently `Relation` directly delegates methods to `Array`. With this change,
+ only the methods present in this whitelist will be delegated.
+
+ The whitelist contains:
+
+ #&, #+, #[], #all?, #collect, #detect, #each, #each_cons, #each_with_index,
+ #flat_map, #group_by, #include?, #length, #map, #none?, :one?, #reverse, #sample,
+ #second, #sort, #sort_by, #to_ary, #to_set, #to_xml, #to_yaml
+
+ To use any other method, instead first call `#to_a` on the association.
+
+ *Lauro Caetano*
+
* Use the right column to type cast grouped calculations with custom expressions.
Fixes #13230.
@@ -449,12 +464,6 @@
*Paul Nikitochkin*
-* Deprecate the delegation of Array bang methods for associations.
- To use them, instead first call `#to_a` on the association to access the
- array to be acted on.
-
- *Ben Woosley*
-
* `CollectionAssociation#first`/`#last` (e.g. `has_many`) use a `LIMIT`ed
query to fetch results rather than loading the entire collection.