-
Notifications
You must be signed in to change notification settings - Fork 70
Removing and blocking friendships
raw1z edited this page Mar 6, 2012
·
1 revision
The remove_friendship() method allow a user to remove its friendships :
@john.remove_friendship @jane
@john.remove_friendship @peter
@john.remove_friendship @victoria
The block() method allow a user to block a friendship with another user :
@john.invite @jane
@jane.block @john
To get the blocked users :
@jane.blocked #=> [@john]
You can also check if a user is blocked :
@jane.blocked? @john #=> true
The unblock() method allow a user to unblock previously blocked friendship with another user :
@jane.block @john
@jane.blocked #=> [@john]
@jane.unblock @john
@jane.blocked #=> []