Class: Rails::Generators::ComponentGenerator

Inherits:
NamedBase
  • Object
show all
Includes:
ViewComponent::AbstractGenerator
Defined in:
lib/rails/generators/component/component_generator.rb

Instance Method Summary collapse

Methods included from ViewComponent::AbstractGenerator

#copy_view_file

Instance Method Details

#create_component_fileObject



22
23
24
# File 'lib/rails/generators/component/component_generator.rb', line 22

def create_component_file
  template "component.rb", File.join(component_path, class_path, "#{file_name}_component.rb")
end