I've found useful to have a port of the Array#each_with_index functionality to the already existent grouping methods (in_groups_of, in_groups). That way we add the ability to iterate over an array in groups and having an index for each group.
In case you think it's interesting I've created a couple of methods: Array#with_index_in_groups_of / with_index_in_groups and sent a pull request here: https://github.com/rails/rails/pull/556 Cheers!, Juanjo. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.