###mongoid_followable###

    • *

### Installation### In console:

gem install mongoid_followable

or in Gemfile:

gem 'mongoid_followable'
    • *

###Usage### To make model followable you need to include Mongoid::Followable into your document:

class User
	include Mongoid::Document
	include Mongoid::Followable
end

Now you can follow others in your controller:

...
	@user = some_other_user
	current_user.follow(@user)
	
	current_user.unfollow(@user)
	
	current_user.follower_of?(@user)
	current_user.followee_of?(@user)
	
	current_user.follower_count
	current_user.followee_count
	
	User.followers_of(current_user)
	User.followees_of(current_user)
...

**In current version, only following the same model is allowed**

###TODO### inter-models followable

###Copyright### Copyright © Jie Fan. See LICENSE.txt for further details.