README.markdown in activity_feed-1.2 vs README.markdown in activity_feed-1.2.1
- old
+ new
@@ -2,11 +2,11 @@
Activity feeds backed by Redis
## Compatibility
-The gem has been built and tested under Ruby 1.9.2-p290
+The gem has been built and tested under Ruby 1.9.2-p290 and Ruby 1.9.3-p0
## Installation
`gem install activity_feed`
@@ -217,9 +217,21 @@
The custom class should implement a find(item_or_item_id) method that does "the right thing".
Consult the specs to see this working if you have questions.
### Feeds and Aggregation Feeds
+
+You can access an activity feed in a couple of ways.
+
+```ruby
+ActivityFeed.feed(user_id) # return an instance of ActivityFeed::Feed
+```
+
+or
+
+```ruby
+ActivityFeed::Feed.new(user_id)
+```
activity_feed uses the following key in adding the item to Redis: `ActivityFeed.namespace:ActivityFeed.key:self.user_id`. By default, activity_feed in the `create_item` call will
also add the item in Redis to an aggregate feed using the key: `ActivityFeed.namespace:ActivityFeed.key:ActivityFeed.aggregate_key:self.user_id`.
You can control aggregation globally by setting the ActivityFeed.aggregate property to either `true` or `false`. You can override the global aggregation setting on the