Class: WhoIsOnline::Generators::ChannelGenerator
- Inherits:
-
ActiveRecord::Generators::Base
- Object
- ActiveRecord::Generators::Base
- WhoIsOnline::Generators::ChannelGenerator
- Extended by:
- Base
- Defined in:
- lib/generators/who_is_online/channel/channel_generator.rb
Overview
Who Is Online generator that creates action_cable files from template
Instance Method Summary collapse
-
#generate_files ⇒ Object
Add action cable in project’s folder.
Methods included from Base
Instance Method Details
#generate_files ⇒ Object
Add action cable in project’s folder
12 13 14 15 |
# File 'lib/generators/who_is_online/channel/channel_generator.rb', line 12 def generate_files copy_file 'who_is_online_channel.rb', "app/channels/#{name}_channel.rb" copy_file 'who_is_online.coffee', "app/assets/javascripts/channels/#{name}.coffee" end |