Sha256: 9324f1df8ae9d8d86744b625131c184c83a99143dafad0fc0be1d3d493104b93
Contents?: true
Size: 514 Bytes
Versions: 17
Compression:
Stored size: 514 Bytes
Contents
class ActivityObject < ActiveRecord::Base include SocialStream::Models::Supertype has_many :activity_object_activities, :dependent => :destroy has_many :activities, :through => :activity_object_activities has_one :actor # The object of this activity object def object subtype_instance || actor.try(:subject) end # The activity in which this activity_object was created def post_activity activities.includes(:activity_verb).where('activity_verbs.name' => 'post').first end end
Version data entries
17 entries across 17 versions & 1 rubygems