README.md in pusherable-1.0.2 vs README.md in pusherable-1.0.3

- old
+ new

@@ -1,13 +1,17 @@ # Pusherable +[![Build Status](https://travis-ci.org/tonycoco/pusherable.png)](https://travis-ci.org/tonycoco/pusherable) + Adds callback hooks for your ActiveRecord models for sending messages to a Pusher channel. ## Installation -Add this line to your application's Gemfile: +Install and configure Pusher to work on your application by following the [pusher gem's instructions](https://github.com/pusher/pusher-gem). +Then, add this line to your application's Gemfile: + gem 'pusherable' And then execute: $ bundle @@ -22,25 +26,34 @@ pusherable(YOUR_CHANNEL) On your subscribed client(s), events will be triggered by Pusher reflecting your ActiveRecord create/update/destroy actions. -### Example - -If you have a model called, __Story__, and you create a new record, Pusher will receive an event called, "story.create". -It will also carry a payload of data containing the __model_id__ - Here is a list of the ActiveRecord callbacks that trigger Pusher events... ``` "model.create" => after_create "model.update" => after_update "model.destroy" => before_destroy ``` +### Example + +If you have an ActiveRecord model called, __Post__, and you create a new record, Pusher will receive an event called, "post.create". +It will also carry a payload of data containing the __model_id__. Future implementations may carry a changeset in the data. For now, let's keep it simple. + +The following callbacks that trigger Pusher events in this __Post__ example will then be... + +``` +"post.create" => after_create +"post.update" => after_update +"post.destroy" => before_destroy +``` + ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request +st