Class: Rails::Generators::ChannelGenerator
- Includes:
- JsPackageManager
- Defined in:
- actioncable/lib/rails/generators/channel/channel_generator.rb
Constant Summary
Constants included from JsPackageManager
Instance Method Summary collapse
Methods included from JsPackageManager
detect, #package_add_command, #package_install_command, #package_lockfile, #package_manager, #using_js_runtime?
Methods inherited from NamedBase
check_class_collision, #initialize
Methods inherited from Base
add_shebang_option!, banner, base_name, base_root, class_option, default_aliases_for_option, default_for_option, default_generator_root, default_source_root, default_value_for_option, desc, exit_on_failure?, generator_name, hide!, hook_for, hooks, inherited, namespace, prepare_for_invocation, remove_hook_for, source_root, usage_path
Methods included from Actions
#add_source, #environment, #gem, #gem_group, #generate, #git, #github, #initialize, #initializer, #lib, #rails_command, #rake, #rakefile, #readme, #route, #vendor
Constructor Details
This class inherits a constructor from Rails::Generators::NamedBase
Instance Method Details
#create_channel_files ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'actioncable/lib/rails/generators/channel/channel_generator.rb', line 21 def create_channel_files create_shared_channel_files create_channel_file if using_javascript? if first_setup_required? create_shared_channel_javascript_files import_channels_in_javascript_entrypoint if using_importmap? pin_javascript_dependencies elsif using_js_runtime? install_javascript_dependencies end end create_channel_javascript_file import_channel_in_javascript_entrypoint end end |