Class: ComponentsGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- ComponentsGenerator
- Defined in:
- lib/generators/components/components_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_component ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/generators/components/components_generator.rb', line 4 def add_component @family = name.underscore.pluralize # Force plural @family_cst = @family.camelize.pluralize # Force plural %w[Destroy Edit Form New].each do |comp_cst| generate "component #{name}::#{comp_cst}" end end |