method

create_channel_file

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: ChannelGenerator
create_channel_file() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actioncable/lib/rails/generators/channel/channel_generator.rb, line 14
      def create_channel_file
        template "channel.rb", File.join("app/channels", class_path, "#{file_name}_channel.rb")

        if options[:assets]
          if behavior == :invoke
            template "assets/cable.js", "app/assets/javascripts/cable.js"
          end

          js_template "assets/channel", File.join("app/assets/javascripts/channels", class_path, "#{file_name}")
        end

        generate_application_cable_files
      end
Register or log in to add new notes.