Skip to content

About

A simple gem for adding an activity feed to an ActiveRecord object

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

HasRedisFeed

HasRedisFeed is a simple way of setting and getting feeds for your ActiveRecord objects.

Prerequisites

HasRedisFeed assumes that you have Redis connected to the $redis global variable.

Usage

Add to feed

user = User.create
user.push_to_feed({:message => 'old message'})
user.push_to_feed({:message => 'new message'})
user.feed 
# => [{"message"=>"new message"}, {"message"=>"old message"}] 

The feed will be created with namespace

feed:class.name:id

So in this case (with user id 1):

feed:#{class.name}:#{id}

About

A simple gem for adding an activity feed to an ActiveRecord object

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages