diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-12-18 20:16:27 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-12-18 20:19:04 +0900 |
commit | 4a7bd88eafa9cfcde843dd7d13d7f9aa88d82526 (patch) | |
tree | 50aa87d18a7ea1e104a96228416107ab945aba40 /actioncable/lib/rails | |
parent | 13007e57ba74e35993e53a499837ed6fba6907c3 (diff) | |
download | rails-4a7bd88eafa9cfcde843dd7d13d7f9aa88d82526.tar.gz rails-4a7bd88eafa9cfcde843dd7d13d7f9aa88d82526.tar.bz2 rails-4a7bd88eafa9cfcde843dd7d13d7f9aa88d82526.zip |
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'
```
Diffstat (limited to 'actioncable/lib/rails')
-rw-r--r-- | actioncable/lib/rails/generators/channel/templates/assets/channel.coffee | 2 |
1 files changed, 1 insertions, 1 deletions
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 -%> |