aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/rails/generators/channel/templates
Commit message (Collapse)AuthorAgeFilesLines
* Use .tt extension to all the template filesRafael Mendonça França2017-11-136-0/+0
| | | | | | | | Make clear that the files are not to be run for interpreters. Fixes #23847. Fixes #30690. Closes #23878.
* Give importance to rails command in the comment section.Santosh Wadghule2016-07-131-1/+1
|
* remove needless commentsyuuji.yaginuma2016-06-063-5/+0
| | | | Follow up to #25240.
* Merge pull request #25076 from jeroenvisser101/keep-to-max-lengthSean Griffin2016-05-212-2/+4
|\ | | | | Change comments to not exceed 80 characters
| * Change comments to not exceed 80 charactersJeroen Visser2016-05-192-2/+4
| | | | | | | | Other generated files do keep to this, but action cable doesn't.
* | 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.
* Generate ApplicationCable files if they do not already existJon Moss2016-02-222-0/+10
|
* don’t explicitly mention EventMachine [ci skip]yuuji.yaginuma2016-02-051-1/+1
| | | | Follow up to 6accef4e11b0c793e1c085536b5ed27f32b6a0c3
* 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-163-35/+0
| | | | Application* stubs
* Comment out the user handling so default setup connects directlyDavid Heinemeier Hansson2015-12-161-18/+18
|
* Require treeDavid Heinemeier Hansson2015-12-161-1/+1
|
* Note that changes to the cable setup requires restarting the serverDavid Heinemeier Hansson2015-12-163-0/+3
|
* @App could have been set elsewhereDavid Heinemeier Hansson2015-12-161-1/+1
|
* Fix parent classDavid 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-155-0/+60