Class: Group

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#_participantsObject

Returns the value of attribute _participants.



4
5
6
# File 'app/models/group.rb', line 4

def _participants
  @_participants
end

Instance Method Details

#followersObject



14
15
16
# File 'app/models/group.rb', line 14

def followers
  contact_subjects(:subject_type => :user, :direction => :received)
end

#profile!Object



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

def profile!
  actor!.profile || actor!.build_profile
end

#recent_groupsObject



18
19
20
21
22
23
# File 'app/models/group.rb', line 18

def recent_groups
  contact_subjects(:type => :group, :direction => :sent) do |q|
    q.select("contacts.created_at").
      merge(Contact.recent)
  end
end