mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
2b09948637
Generators generate things, but what is meant by 'Stubbing out' might confuse beginners and non-native English speakers. While generated tests are stubs that should have an implementation, a generated model is a valid model that doesn't require any changes.
13 lines
516 B
Text
13 lines
516 B
Text
Description:
|
|
============
|
|
Generates a new cable channel for the server (in Ruby) and client (in JavaScript).
|
|
Pass the channel name, either CamelCased or under_scored, and an optional list of channel actions as arguments.
|
|
|
|
Example:
|
|
========
|
|
bin/rails generate channel Chat speak
|
|
|
|
creates a Chat channel class, test and JavaScript asset:
|
|
Channel: app/channels/chat_channel.rb
|
|
Test: test/channels/chat_channel_test.rb
|
|
Assets: app/javascript/channels/chat_channel.js
|