lib/muck-friends/models/friend.rb
# When enable_following is true this will setup a follower.  When enable_following is false
# the system only allows friends and so this becomes a friend request
When enable_following is true this will setup a follower.  When enable_following is false
the system only allows friends and so this becomes a friend request
When enable_following is true this will setup a follower . When enable_following is false the system only allows friends and so this becomes a friend request
def add_follower(inviter, invited)
          return false if inviter.blank? || invited.blank? || inviter == invited
          success = false
          transaction do
            friend = self.create(:inviter => inviter, :invited => invited, :status => MuckFriends::FOLLOWING)
            friend.add_follow_activity
            success = !friend.new_record?
          end
          success
        end
def add_follower ( inviter , invited ) return false if inviter . blank? || invited . blank? || inviter == invited success = false transaction do friend = self . create ( :inviter => inviter , :invited => invited , :status => MuckFriends :: FOLLOWING ) friend . add_follow_activity success = ! friend . new_record? end success end
When enable_following is true this will setup a follower.
When enable_following is true this will setup a follower .
inviter
invited