Class: Stimulus::Generators::ComponentGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Stimulus::Generators::ComponentGenerator
- Includes:
- ViewComponent::AbstractGenerator
- Defined in:
- lib/rails/generators/stimulus/component_generator.rb
Instance Method Summary collapse
Methods included from ViewComponent::AbstractGenerator
Instance Method Details
#create_stimulus_controller ⇒ Object
13 14 15 |
# File 'lib/rails/generators/stimulus/component_generator.rb', line 13 def create_stimulus_controller template "component_controller.js", destination end |
#stimulus_module ⇒ Object
17 18 19 20 21 |
# File 'lib/rails/generators/stimulus/component_generator.rb', line 17 def stimulus_module return "stimulus" if legacy_stimulus? "@hotwired/stimulus" end |