| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
".. with __dir__ we can restore order in the Universe." - by @fxn
Related to 5b8738c2df003a96f0e490c43559747618d10f5f
|
|
|
|
| |
Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
|
| |
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
| |
|
|
|
|
| |
Follow up to #25240.
|
|\
| |
| | |
Change comments to not exceed 80 characters
|
| |
| |
| |
| | |
Other generated files do keep to this, but action cable doesn't.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
javascript engine of the application
- Now we will detect what javascript engine user is using and based on
that we will generate either `.js` or `.coffee` version of the channel
file.
- This also needs a change in coffee-rails to override the `js_template`
method. Related PR https://github.com/rails/coffee-rails/pull/72.
- Currently coffee-rails gem sets
`config.app_generators.javascript_engine` to `:coffee` and using this
information we override the `js_template` to set the extension as
`.coffee` in coffee-rails gem.
- Using this approach, we can keep the `channel.js` and `channel.coffee`
files in the Rails repository itself.
- Additionally the `js_template` method can act as public interface for
coffee-rails gem to hook into and change the extension to `.coffee`
without maintaining the actual asset files.
[Prathamesh Sonpatki, Matthew Draper]
|
|
|
|
| |
`cable.js` is required for other Channels.
|
|
|
|
|
|
|
|
|
| |
- Before this, while generating a channel, we were not creating
`cable.js` if it does not already exist.
- We have similar code for application mailer here -
https://github.com/rails/rails/commit/0b3ae023d27197417541932632055cd6be4810c4.
- Based on the comment -
https://github.com/rails/rails/issues/24418#issuecomment-205421995.
|
| |
|
|
|
|
| |
In order to eliminate the dependecy of CoffeeScript.
|
|
|
|
|
|
|
| |
Once RubyGems 2.5.0 is required, then the duplicated files can be
removed, and symlinks can be used instead.
[ci skip]
|
| |
|
|
|
|
| |
Follow up to 6accef4e11b0c793e1c085536b5ed27f32b6a0c3
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
```
# 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'
```
|
| |
|
|
|
| |
Fix typo
|
| |
|
|
|
|
| |
Application* stubs
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|