Class: ViewComponent::Generators::StimulusGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- ViewComponent::Generators::StimulusGenerator
- Includes:
- AbstractGenerator
- Defined in:
- lib/generators/view_component/stimulus/stimulus_generator.rb
Instance Method Summary collapse
Methods included from AbstractGenerator
Instance Method Details
#create_stimulus_controller ⇒ Object
14 15 16 |
# File 'lib/generators/view_component/stimulus/stimulus_generator.rb', line 14 def create_stimulus_controller template "component_controller.#{filetype}", destination end |
#stimulus_module ⇒ Object
18 19 20 21 22 |
# File 'lib/generators/view_component/stimulus/stimulus_generator.rb', line 18 def stimulus_module return "stimulus" if legacy_stimulus? "@hotwired/stimulus" end |