aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/CHANGELOG
diff options
context:
space:
mode:
authorAdrian Mugnolo <adrian@mugnolo.com>2008-07-15 01:17:03 -0300
committerPratik Naik <pratiknaik@gmail.com>2008-07-15 15:04:26 +0100
commitfc89a951933638b051bb1f9e1339ee6ae7c94cda (patch)
treedfef7e73b3b19a65895651c82cb6e0b727394eab /activesupport/CHANGELOG
parentc1531ae00dbd3ac804bce02733e050ec43400607 (diff)
downloadrails-fc89a951933638b051bb1f9e1339ee6ae7c94cda.tar.gz
rails-fc89a951933638b051bb1f9e1339ee6ae7c94cda.tar.bz2
rails-fc89a951933638b051bb1f9e1339ee6ae7c94cda.zip
Add in_groups to ActiveSupport::CoreExtensions::Array::Grouping. [#579 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activesupport/CHANGELOG')
-rw-r--r--activesupport/CHANGELOG6
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG
index a7b33c09ad..8d3b136d80 100644
--- a/activesupport/CHANGELOG
+++ b/activesupport/CHANGELOG
@@ -1,5 +1,11 @@
*Edge*
+* Add Array#in_groups which splits or iterates over the array in specified number of groups. #579. [Adrian Mugnolo] Example:
+
+ a = (1..10).to_a
+ a.in_groups(3) #=> [[1, 2, 3, 4], [5, 6, 7, nil], [8, 9, 10, nil]]
+ a.in_groups(3, false) #=> [[1, 2, 3, 4], [5, 6, 7], [8, 9, 10]]
+
* Fix TimeWithZone unmarshaling: coerce unmarshaled Time instances to utc, because Ruby's marshaling of Time instances doesn't respect the zone [Geoff Buesing]
* Added Memoizable mixin for caching simple lazy loaded attributes [Josh Peek]