aboutsummaryrefslogblamecommitdiffstats
path: root/actioncable/lib/rails/generators/channel/templates/channel.rb
blob: 6cf04ee61fa5e50d5e16bedaa42f349d1fe9cb37 (plain) (tree)
1
2
3
                                                                                                                                           
                            
                                                          













                                                     
# Be sure to restart your server when you modify this file. Action Cable runs in an EventMachine loop that does not support auto reloading.
<% module_namespacing do -%>
class <%= class_name %>Channel < ApplicationCable::Channel
  def subscribed
    # stream_from "some_channel"
  end

  def unsubscribed
    # Any cleanup needed when channel is unsubscribed
  end
<% actions.each do |action| -%>

  def <%= action %>
  end
<% end -%>
end
<% end -%>