aboutsummaryrefslogblamecommitdiffstats
path: root/actioncable/lib/rails/generators/channel/USAGE
blob: ea9662436cee9eaa7d79231df3dfa2dc5576aa3e (plain) (tree)
1
2
3
4
5
6
7
8
9

            
                                                                                      
                                                                                                                   
 



                                     
                                                      
                                                
                                                           
Description:
============
    Stubs out 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:
========
    rails generate channel Chat speak

    creates a Chat channel class and JavaScript asset:
        Channel:    app/channels/chat_channel.rb
        Assets:     app/javascript/channels/chat_channel.js