Created
April 25, 2012 19:01
-
-
Save mmacedo/2492311 to your computer and use it in GitHub Desktop.
Rails array grouping for Mongoid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Enumerable | |
def in_groups_of(*args, &block) | |
to_a.in_groups_of(*args, &block) | |
end | |
def in_groups(*args, &block) | |
to_a.in_groups(*args, &block) | |
end | |
def split(*args, &block) | |
to_a.split(*args, &block) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment