Module: FayePlugin::HelperAdditions::InstanceMethods
- Defined in:
- lib/faye-plugin.rb
Instance Method Summary collapse
Instance Method Details
#broadcast(&block) ⇒ Object
14 15 16 |
# File 'lib/faye-plugin.rb', line 14 def broadcast(&block) @faye_client.publish '/listener', :data => capture(&block) end |
#faye_watcher(object, attribute) ⇒ Object
10 11 12 |
# File 'lib/faye-plugin.rb', line 10 def faye_watcher(object, attribute) content_tag(:div, "#{object[attribute.to_sym]}", {:id => "#{object.class.name.downcase}_#{object.id}_#{attribute}"}) end |