Sha256: 22bcd550c112df25abf0558fb7b82b19e17a4ae38c000ce089a7fa52484e986c

Contents?: true

Size: 362 Bytes

Versions: 20

Compression:

Stored size: 362 Bytes

Contents

class ComponentsGenerator < Rails::Generators::NamedBase
  source_root File.expand_path('templates', __dir__)

  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
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
compony-0.5.2 lib/generators/components/components_generator.rb
compony-0.5.1 lib/generators/components/components_generator.rb
compony-0.5.0 lib/generators/components/components_generator.rb
compony-0.4.1 lib/generators/components/components_generator.rb
compony-0.4.0 lib/generators/components/components_generator.rb
compony-0.3.3 lib/generators/components/components_generator.rb
compony-0.3.2 lib/generators/components/components_generator.rb
compony-0.3.1 lib/generators/components/components_generator.rb
compony-0.3.0 lib/generators/components/components_generator.rb
compony-0.2.3 lib/generators/components/components_generator.rb
compony-0.2.2 lib/generators/components/components_generator.rb
compony-0.2.1 lib/generators/components/components_generator.rb
compony-0.2.0 lib/generators/components/components_generator.rb
compony-0.1.1 lib/generators/components/components_generator.rb
compony-0.1.0 lib/generators/components/components_generator.rb
compony-0.0.9 lib/generators/components/components_generator.rb
compony-0.0.8 lib/generators/components/components_generator.rb
compony-0.0.7 lib/generators/components/components_generator.rb
compony-0.0.6 lib/generators/components/components_generator.rb
compony-0.0.5 lib/generators/components/components_generator.rb