Class: ActivityObject

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
SocialStream::Models::Supertype
Defined in:
app/models/activity_object.rb

Instance Method Summary collapse

Instance Method Details

#objectObject

The object of this activity object



9
10
11
12
# File 'app/models/activity_object.rb', line 9

def object
  subtype_instance ||
    actor.try(:subject)
end

#post_activityObject

The activity in which this activity_object was created



15
16
17
# File 'app/models/activity_object.rb', line 15

def post_activity
  activities.includes(:activity_verb).where('activity_verbs.name' => 'post').first
end