aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/rails/generators/channel/templates/assets
Commit message (Collapse)AuthorAgeFilesLines
* Give importance to rails command in the comment section.Santosh Wadghule2016-07-131-1/+1
|
* Cable: Generate .js or .coffee files while generating channel as per the ↵Prathamesh Sonpatki2016-05-171-0/+18
| | | | | | | | | | | | | | | | | | | | | 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]
* Generate `cable.js` file if does not exist when generating channelPrathamesh Sonpatki2016-04-121-0/+13
| | | | | | | | | - 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.
* add line break between method of generated channel jsyuuji.yaginuma2015-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` # 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' ```
* Should also stub the received callbackDavid Heinemeier Hansson2015-12-171-0/+3
|
* Generate all the ApplicationCable stubs by default, like all other ↵David Heinemeier Hansson2015-12-161-6/+0
| | | | Application* stubs
* Require treeDavid Heinemeier Hansson2015-12-161-1/+1
|
* @App could have been set elsewhereDavid Heinemeier Hansson2015-12-161-1/+1
|
* Move Cable to ActionCable for client-side constant to avoid conflictsDavid Heinemeier Hansson2015-12-161-2/+2
|
* Basic channel generatorDavid Heinemeier Hansson2015-12-152-0/+17