Should also stub the received callback

This commit is contained in:
David Heinemeier Hansson 2015-12-17 21:53:05 +01:00
parent 19e7f65dd1
commit e16d7c6808
1 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,9 @@ App.<%= class_name.underscore %> = App.cable.subscriptions.create "<%= class_nam
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 %>'