diff options
Diffstat (limited to 'actioncable/lib/rails/generators/channel/templates/channel.rb.tt')
-rw-r--r-- | actioncable/lib/rails/generators/channel/templates/channel.rb.tt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/actioncable/lib/rails/generators/channel/templates/channel.rb.tt b/actioncable/lib/rails/generators/channel/templates/channel.rb.tt new file mode 100644 index 0000000000..4bcfb2be4d --- /dev/null +++ b/actioncable/lib/rails/generators/channel/templates/channel.rb.tt @@ -0,0 +1,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 -%> |