app/models/group.rb in social_stream-0.2.3 vs app/models/group.rb in social_stream-0.3.0

- old
+ new

@@ -1,5 +1,19 @@ class Group < ActiveRecord::Base + attr_accessor :_founder + def followers - sender_subjects(:user, :relations => 'follower') + subjects(:subject_type => :user, :direction => :senders) + end + + after_create :create_founder + + private + + def create_founder + founder = + Actor.find_by_permalink(_founder) || raise("Cannot create group without founder") + + sent_ties.create! :receiver => founder, + :relation => relations.sort.first end end