If you're working on a webapp these days, chances are you've needed to build an activity feed or two. There are a few approaches floating around — mostly involving observers. Not a fan of observers and needing something reusable, we built our own.
To get started with timeline_fu, run the generator.
script/generate timeline_fu && rake db :migrate
You'll get a model called TimelineEvent and the necessary migration. Then, anywhere you need to fire a timeline event, simply declare it.
class Post belongs_to :creator, :class_name => "User" fires :created, :actor => :creator, :on => :create end


No selection was clipped for this page.
Loading...