You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the "What is an activity feed?" wiki it mentions a feed is "personalized for a given user or a group, or global". Are group-based feeds supported by simple-feed?
In my requirements, I have account-based feeds and resource-based feeds. Both Accounts and Groups can be created by users and each should have their own scoped feed. I'm wondering where and how I should be instantiating those feeds.
I've got the gem talking with Redis by placing the SimpleFeed.define example into an initializer, but I believe I should have a migration to create the feeds for existing accounts and then an after_create action for creating new feeds for new accounts. Would something like SimpleFeed.feed(:account_feed).activity(@account.id)be enough to scope a feed to an account?
The text was updated successfully, but these errors were encountered:
Figured it out. Groups can just be a different feed.
SimpleFeed.define(:group_1) do |f|
f.provider = SimpleFeed.provider(
:redis,
redis: -> { Redis.new(url: SIMPLEFEED_URL) },
pool_size: 10
)
f.per_page = 25 # default page size
f.batch_size = 10 # default batch size
f.namespace = "g1" # only needed if you use the same redis for more than one feed
end
SimpleFeed.define(:group_2) do |f|
f.provider = SimpleFeed.provider(
:redis,
redis: -> { Redis.new(url: SIMPLEFEED_URL) },
pool_size: 10
)
f.per_page = 25 # default page size
f.batch_size = 10 # default batch size
f.namespace = "g2" # only needed if you use the same redis for more than one feed
end
On the "What is an activity feed?" wiki it mentions a feed is "personalized for a given user or a group, or global". Are group-based feeds supported by simple-feed?
In my requirements, I have account-based feeds and resource-based feeds. Both Accounts and Groups can be created by users and each should have their own scoped feed. I'm wondering where and how I should be instantiating those feeds.
I've got the gem talking with Redis by placing the
SimpleFeed.define
example into an initializer, but I believe I should have a migration to create the feeds for existing accounts and then an after_create action for creating new feeds for new accounts. Would something likeSimpleFeed.feed(:account_feed).activity(@account.id)
be enough to scope a feed to an account?The text was updated successfully, but these errors were encountered: