Created
May 7, 2011 16:30
-
-
Save meltzerj/960625 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NOTIFICATIONS_CONDITION = 'some SQL' | |
| has_many :user_notifications | |
| has_many :notifications, :through => :user_notifications, | |
| :conditions => NOTIFICATIONS_CONDITION, | |
| :order => "timeline_events.created_at DESC" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| belongs_to :user | |
| belongs_to :notification, :class_name => 'TimelineEvent' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #an example of how a timeline_event is created (relies on timeline_fu plugin) | |
| fires :video_added, :on => :create, | |
| :actor => :user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment