Lets say I have posts, and posts are created by many different users.
I'm trying to get an array thats 2D, and shows the sum of the posts created by each user. A final array might look like:
[["Jeff",2],["Mike",10],["Jenny",3]]
etc.
I'm trying to create this in my posts model, so something like:
def self.distribution
logic here
end
Thanks!