From e87c3da2a291b54bce0be39ab2ec60ecd6d795a5 Mon Sep 17 00:00:00 2001 From: laurocaetano Date: Tue, 22 Oct 2013 19:41:08 -0200 Subject: Add changelog --- activerecord/CHANGELOG.md | 21 +++++++++++++++------ 1 file 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. -- cgit v1.2.3