Pousse
TODO: Write a gem description
Installation
Add this line to your application's Gemfile:
gem 'pousse'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pousse
Usage
Create an initializer config/initializer/pousse.rb
Pousse::configure do |config|
end
Add this line to your layout :
<div data-pousse="<%= Pousse::layout([:everybody]) %>">
Include the javascript :
//require pousse
Create a new mailer in app/mailer/pousse.rb
class AlertMailer < Pousse::Mailer
def send_alert
mail(
to: 'everybody',
body: 'alert("Hello World !")'
)
end
end
TODO :
Should add some logging when redis is not available.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request