Class: Modular::ComponentGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/modular/generators/component/component_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_controllerObject



9
10
11
# File 'lib/modular/generators/component/component_generator.rb', line 9

def generate_controller
  template "template.erb", "app/views/components/#{filename}.html.erb"  
end

#generate_templateObject



5
6
7
# File 'lib/modular/generators/component/component_generator.rb', line 5

def generate_template
  template "component.rb.erb", "app/components/#{filename}.rb"  
end