class WhoIsOnline::Generators::ChannelGenerator

Who Is Online generator that creates action_cable files from template

Public Instance Methods

generate_files() click to toggle source

Add action cable in project's folder

# 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