Class: Timeful::Activity Abstract
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Timeful::Activity
- Defined in:
- app/models/timeful/activity.rb
Overview
This class is abstract.
Subclass and override #subscribers to implement your own activity
An activity is something that happens in your application. It’s comprised of an actor, an action and an target.
An example activity might be: “John Doe (actor) published (action) a new post (target).”
Instance Method Summary collapse
-
#subscribers ⇒ Object
Returns the users that subscribe to this activity.
Instance Method Details
#subscribers ⇒ Object
Returns the users that subscribe to this activity. A FeedItem linked to the activity will be created for these users.
The returned value can be an instance of either ActiveRecord::Relation
or Array
. The former is preferred when the subscribers list is very long, as we’ll automatically use find_each
to reduce memory usage if it’s available.
32 33 34 |
# File 'app/models/timeful/activity.rb', line 32 def subscribers fail NotImplementedError end |