instance method create_channel_file

Ruby on Rails 5.0.7.2

Since v5.0.7.2

Available in: v5.0.7.2 v5.1.7 v5.2.8.1 v6.0.6.1 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3.2 v8.0.5.1 v8.1.3.1 edge

Signature

create_channel_file()

No documentation comment.

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

        if options[:assets]
          if self.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

Defined in actioncable/lib/rails/generators/channel/channel_generator.rb line 12 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Generators::ChannelGenerator

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close