Links
Acts As Notifiable
Categories
Acts As Notifiable
Acts As Notifiable enables your Rails app to send notification to Jabber client.
###Install
$script/plugin install http://svn.s21g.com/public/rails/plugins/acts_as_notifiable/
###Requirements
XMPP4R(http://xmpp4r.rubyforge.org/)
$sudo gem install xmpp4r
###Example
Please consult the README for details.
http://svn.s21g.com/public/rails/plugins/acts_as_notifiable/README
1. Add config file to your Rails app.
#{RAILS_ROOT}/config/acts_as_notifiable.yml
to:
recipients: you@gmail.com me@gmail.com
from:
id: your_notify_account@gmail.com
password: pass
connect: talk.google.com
2. Add +acts_as_notifiable+ to the Model class:
class Post < ActiveRecord::Base
acts_as_notifiable :callback => :after_create,
:message => Proc.new {|o| "[#{o.class.name}]##{o.id} #{o.body}"},
:recipients => "aaa@gmail.com bbb@gmail.com"
end
Vitals
| Home | http://blog.s21g.com/articles/414 |
|---|---|
| Repository | http://svn.s21g.com/public/rails/plugins/acts_as_notifiable/ |
| License | Rails' (MIT) |
| Rating | (6 votes) |
| Owner | Satoko Hibi |
| Created | 6 March 2008 |
