aboutsummaryrefslogblamecommitdiffstats
path: root/actioncable/lib/rails/generators/channel/templates/channel.rb
blob: 4bcfb2be4dc19000ee9d2bf3da44f9016061da55 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
                            
                                                          













                                                     
<% 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 -%>