1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

10 commits

Author SHA1 Message Date
yuuji.yaginuma
4a7bd88eaf 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'
```
2015-12-18 20:19:04 +09:00
David Heinemeier Hansson
e16d7c6808 Should also stub the received callback 2015-12-17 21:53:05 +01:00
David Heinemeier Hansson
28035db109 Generate all the ApplicationCable stubs by default, like all other Application* stubs 2015-12-16 21:05:13 +01:00
David Heinemeier Hansson
bf16ec25b3 Comment out the user handling so default setup connects directly 2015-12-16 20:36:11 +01:00
David Heinemeier Hansson
0036cb35b8 Require tree 2015-12-16 18:58:50 +01:00
David Heinemeier Hansson
0625d77784 Note that changes to the cable setup requires restarting the server 2015-12-16 18:23:11 +01:00
David Heinemeier Hansson
8e9b7c0405 @App could have been set elsewhere 2015-12-16 18:17:12 +01:00
David Heinemeier Hansson
aae14ab3ac Fix parent class 2015-12-16 18:17:12 +01:00
David Heinemeier Hansson
26bcf81a01 Move Cable to ActionCable for client-side constant to avoid conflicts 2015-12-16 15:29:21 +01:00
David Heinemeier Hansson
40cc72548f Basic channel generator 2015-12-15 21:39:22 +01:00