Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group multiple similar activities into one activity #88

Closed
Waylon87 opened this issue Mar 22, 2013 · 2 comments
Closed

Group multiple similar activities into one activity #88

Waylon87 opened this issue Mar 22, 2013 · 2 comments

Comments

@Waylon87
Copy link

Currently I have an activity stream that shows users activities like in the railscasts. However I would like to be able to group certain activities into a single activity in the view.

I'll use the railscasts as an example. If a friend of mine comments on a recipe 3 times, within a given time frame, Id like for that activity to only show once in the activity stream as Ryan commented on Roast Beef. instead of that same activity showing three times in a row.

Further, it would also be nice if I could group multiple users activities into one activity in the view. For example, Ryan and 5 others commented on Roast Beef.

right now im using this scope in my activities controller

@activities = PublicActivity::Activity.order("created_at desc").where(owner_id: current_user.followed_users, owner_type: "User")

I'm looking for some guidance on how I should approach this, maybe someone has done this already.

I'm thinking it might be just a scope on the controller, but not completely sure how I should go about it.

Any help would be much appreciated.

@roycef
Copy link

roycef commented Mar 27, 2013

It looks like this is related to this issue: #61

@Waylon87
Copy link
Author

@roycef Yes, it appears so. I will follow issue #61 and close this one out. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants