Sha256: 643b6af1b7c600ca610bac42ec50a7b9b36e95f63663cdd7d68bb8a7f1cae69c

Contents?: true

Size: 990 Bytes

Versions: 12

Compression:

Stored size: 990 Bytes

Contents

class ComponentGenerator < ScaffoldGenerator
  
  def manifest
    record do |m|
      # Check for class naming collisions.
      m.class_collisions(class_name)

      # Controller, views, test and stylesheets directories.
      m.directory(File.join('spec','factories'))
      m.directory(File.join('app','views','components'))
      m.directory(File.join('app','views','admin','components'))

      m.template(
        "model.rb",
        File.join('app','models',"#{controller_file_name.singularize}.rb")
      )

      m.template(
        "template.html.erb",
        File.join('app','views','components', "#{controller_file_name.singularize}.html.erb")
      )
      
      m.template(
        "admin_template.html.erb",
        File.join('app','views','admin','components', "_#{controller_file_name.singularize}.html.erb")
      )
      
      m.template(
        "factory.rb",
        File.join('spec','factories',"#{controller_file_name.singularize}.rb")
      )
    end
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
noodall-ui-0.0.13 generators/component/component_generator.rb
noodall-ui-0.0.12 generators/component/component_generator.rb
noodall-ui-0.0.11 generators/component/component_generator.rb
noodall-ui-0.0.10 generators/component/component_generator.rb
noodall-ui-0.0.9 generators/component/component_generator.rb
noodall-ui-0.0.8 generators/component/component_generator.rb
noodall-ui-0.0.7 generators/component/component_generator.rb
noodall-ui-0.0.6 generators/component/component_generator.rb
noodall-ui-0.0.5 generators/component/component_generator.rb
noodall-ui-0.0.4 generators/component/component_generator.rb
noodall-ui-0.0.3 generators/component/component_generator.rb
noodall-ui-0.0.2 generators/component/component_generator.rb