README.rdoc in mongoid_follow-0.2.1 vs README.rdoc in mongoid_follow-0.2.2

- old
+ new

@@ -46,10 +46,44 @@ @bonnie.follow(@group) @gang.follower?(@bonnie) @bonnie.follows?(@gang) +=== Getting followers/followees + +Get all followers/followees by + + @gang.all_followers + @bonnie.all_followees + +You can also get followers/followees by a certain model + + @gang.all_followers_by_model(User) + @bonnie.all_followees_by_model(Gang) + +=== Counting followers/followees + +Get the count of followers/followees using + + @gang.followers_count + @bonnie.followees_count + +Or by a certain model by + + @gang.followers_count_by_model(User) + @bonnie.followees_count_by_model(User) + +=== Dynamic methods + +You can use dynamic methods to shorten code for getting followers/followees or their count of a certain model by + + @gang.all_user_followers + @bonnie.all_gang_followees + + @gang.user_followers_count + @bonnie.user_followees_count + == Callbacks You can attach callbacks to the follower/followee models before or after the follow. # Follower model @@ -71,11 +105,11 @@ # Other followee callbacks after_followed_by before_unfollowed_by after_unfollowed_by -* Note: careful with using callbacks, we have no transaction so if breaks on your callbacks, what gets saved is saved. +Note: careful with using callbacks, we have no transaction so if it breaks on your callbacks, what gets saved is saved. * Any bug or issue, please send me an email to aeguintu@gmail.com == For development @@ -86,18 +120,16 @@ rake spec/specs/follow_spec_rb == TODO -* finish up todo's (list of followers and followees) ==FINISHED -* count of followers/followees ==FINISHED -* common followers (or maybe followees) ==FINISHED +* limit result of followers/followees == Thanks -Super thanks: -to mongoid_followable. -to Tristan Peralta. +Awesome thanks to: + to mongoid_followable + to Tristan Peralta == Copyright Copyright (c) Alec Guintu. See LICENSE.txt for further details.