README.md in popular-0.5.1 vs README.md in popular-0.6.0
- old
+ new
@@ -6,10 +6,14 @@
[![Inline docs](http://inch-pages.github.io/github/thejchap/popular.png)](http://inch-pages.github.io/github/thejchap/popular)
[![Dependency Status](https://gemnasium.com/thejchap/popular.svg)](https://gemnasium.com/thejchap/popular)
Popular is a friendship gem designed for Rails/ActiveRecord models.
+- RubyGems: ( https://rubygems.org/gems/popular )
+- Website: ( http://thejchap.github.io/popular )
+- RDoc: ( http://rubydoc.info/github/thejchap/popular/master/frames )
+
## Installation
Add this line to your application's Gemfile:
gem 'popular'
@@ -59,10 +63,24 @@
@sam.befriend @jackson
@sam.mutual_friends_with? @jackson #=> true
```
+### Aliases
+
+In Popular, `befriend` is synonomous with `follow`, so if it better fits the context of your application, you can use
+follow methods/relations instead. For example:
+
+```ruby
+@sam.follow @jackson
+@sam.following? @jackson #=> true
+
+@jackson.follow @sam
+@sam.followers.include? @jackson #=> true
+```
+
+
### Callbacks
Popular provides callbacks that are fired around friendship creation. Available callbacks are:
- after_befriend
- before_befriend
@@ -89,9 +107,25 @@
@jenny = User.create name: "Jenny"
@justin.befriend @jenny #=> "Friendship created successfully"
@justin.unfriend @jenny #=> ":("
```
+
+## Related gems
+
+If Popular isn't quite what you're looking for, here are some other useful gems in the same category:
+
+- Amistad ( https://github.com/raw1z/amistad )
+- Friendable ( https://github.com/yuki24/friendable )
+
+*Disclaimer: I have not used either of the above gems*
+
+
+## Resources
+
+Popular was heavily inspired by this screencast: ( http://railscasts.com/episodes/163-self-referential-association?view=asciicast )
+
+
## Contributing
1. Fork it ( http://github.com/thejchap/popular/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)