From 4a7bd88eafa9cfcde843dd7d13d7f9aa88d82526 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Fri, 18 Dec 2015 20:16:27 +0900 Subject: add line break between method of generated channel js ``` # before App.appearance = App.cable.subscriptions.create "AppearanceChannel", 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 appear: -> @perform 'appear' away: -> @perform 'away' ``` ``` # after App.appearance = App.cable.subscriptions.create "AppearanceChannel", 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 appear: -> @perform 'appear' away: -> @perform 'away' ``` --- .../lib/rails/generators/channel/templates/assets/channel.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actioncable/lib/rails') diff --git a/actioncable/lib/rails/generators/channel/templates/assets/channel.coffee b/actioncable/lib/rails/generators/channel/templates/assets/channel.coffee index 149821f1ea..5467811aba 100644 --- a/actioncable/lib/rails/generators/channel/templates/assets/channel.coffee +++ b/actioncable/lib/rails/generators/channel/templates/assets/channel.coffee @@ -7,8 +7,8 @@ App.<%= class_name.underscore %> = App.cable.subscriptions.create "<%= class_nam received: (data) -> # Called when there's incoming data on the websocket for this channel - <% actions.each do |action| -%> + <%= action %>: -> @perform '<%= action %>' <% end -%> -- cgit v1.2.3