diff options
Diffstat (limited to 'app/models/stream_entry.rb')
-rw-r--r-- | app/models/stream_entry.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/stream_entry.rb b/app/models/stream_entry.rb index 0cc959a1c..68a33ccf7 100644 --- a/app/models/stream_entry.rb +++ b/app/models/stream_entry.rb @@ -4,6 +4,8 @@ class StreamEntry < ActiveRecord::Base validates :account, :activity, presence: true + scope :with_includes, -> { includes(:activity) } + def object_type orphaned? ? :activity : (targeted? ? :activity : self.activity.object_type) end |