I am currently looking for a software/web development job preferably as a Rails-based developer.
Please email me at email@example.com. Thanks in advance for any leads!
Using Each_with_index With Group_by In Rails
Posted by Weston Ganger
I wanted to use each_with_index on my group_by but it wasnt working right.
Ruby just requires you to wrap some parameters in parenthesis
@posts.group_by(&:category).each_with_index do |(category, posts), index| # do work end
Related External Links: