Sha256: 28a340e2b2337edbad2a3f6049fd00b108ad447ee707e0d20266d7b938a3cfa8

Contents?: true

Size: 455 Bytes

Versions: 88

Compression:

Stored size: 455 Bytes

Contents

App.<%= class_name.underscore %> = App.cable.subscriptions.create "<%= class_name %>Channel",
  connected: ->
    # Called when the subscription is ready for use on the server

  disconnected: ->
    # Called when the subscription has been terminated by the server

  received: (data) ->
    # Called when there's incoming data on the websocket for this channel
<% actions.each do |action| -%>

  <%= action %>: ->
    @perform '<%= action %>'
<% end -%>

Version data entries

88 entries across 88 versions & 6 rubygems

Version Path
actioncable-5.0.0.rc2 lib/rails/generators/channel/templates/assets/channel.coffee
actioncable-5.0.0.racecar1 lib/rails/generators/channel/templates/assets/channel.coffee
actioncable-5.0.0.rc1 lib/rails/generators/channel/templates/assets/channel.coffee
actioncable-5.0.0.beta4 lib/rails/generators/channel/templates/assets/channel.coffee
actioncable-5.0.0.beta3 lib/rails/generators/channel/templates/assets/channel.coffee
actioncable-5.0.0.beta2 lib/rails/generators/channel/templates/assets/channel.coffee
actioncable-5.0.0.beta1.1 lib/rails/generators/channel/templates/assets/channel.coffee
actioncable-5.0.0.beta1 lib/rails/generators/channel/templates/assets/channel.coffee