aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/channel_generator_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* applies new string literal convention in railties/testXavier Noria2016-08-061-10/+10
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Cable: Generate .js or .coffee files while generating channel as per the ↵Prathamesh Sonpatki2016-05-171-4/+20
| | | | | | | | | | | | | | | | | | | | | 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]
* don't remove `cable.js`yuuji.yaginuma2016-04-161-0/+12
| | | | `cable.js` is required for other Channels.
* Generate `cable.js` file if does not exist when generating channelPrathamesh Sonpatki2016-04-121-0/+8
| | | | | | | | | - 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.
* Address ruby warningsTeo Ljungberg2016-02-291-8/+8
| | | | | - Ambiguous first argument - Mismatched indentation
* Generate ApplicationCable files if they do not already existJon Moss2016-02-221-0/+12
|
* Use the generators options to not generate channel assetsRafael Mendonça França2015-12-211-6/+2
|
* Ensure that assets are enabled back after the test that tests assets are ↵Prathamesh Sonpatki2015-12-211-1/+4
| | | | disabled
* Action Cable channel generator should not create JS assets in --api modeRyo Hashimoto2015-12-191-0/+30