Class: Gaggle::Channel
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Gaggle::Channel
- Defined in:
- app/models/gaggle/channel.rb
Instance Method Summary collapse
Instance Method Details
#broadcast_create ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'app/models/gaggle/channel.rb', line 16 def broadcast_create broadcast_before_to "gaggle", targets: ".new-channel", content: ApplicationController.render( partial: "gaggle/channels/channel", locals: { channel: self } ) end |
#broadcast_destroy ⇒ Object
35 36 37 |
# File 'app/models/gaggle/channel.rb', line 35 def broadcast_destroy broadcast_remove_to "gaggle", targets: ".#{dom_id(self, :sidebar)}" end |
#broadcast_update ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'app/models/gaggle/channel.rb', line 25 def broadcast_update broadcast_replace_to "gaggle", targets: ".#{dom_id(self, :sidebar)}", partial: "gaggle/channels/channel", content: ApplicationController.render( partial: "gaggle/channels/channel", locals: { channel: self } ) end |