method
create_channel_file
v6.0.0 -
Show latest stable
- Class:
Rails::Generators::ChannelGenerator
create_channel_file()public
No documentation available.
# File actioncable/lib/rails/generators/channel/channel_generator.rb, line 16
def create_channel_file
template "channel.rb", File.join("app/channels", class_path, "#{file_name}_channel.rb")
if options[:assets]
if behavior == :invoke
template "javascript/index.js", "app/javascript/channels/index.js"
template "javascript/consumer.js", "app/javascript/channels/consumer.js"
end
js_template "javascript/channel", File.join("app/javascript/channels", class_path, "#{file_name}_channel")
end
generate_application_cable_files
end