Sha256: d250e052ec871e668d4aa43acae20b8ef8a77daaf95be0881301f66ee9d1913d

Contents?: true

Size: 776 Bytes

Versions: 15

Compression:

Stored size: 776 Bytes

Contents

class MotionPrime::ScaffoldGenerator < MotionPrime::Generator
  def generate(name)
    @s_name = name.singularize.downcase
    @p_name = name.pluralize.downcase
    @s_title = @s_name.titleize
    @p_title = @p_name.titleize
    @s_class_name = @s_name.camelize
    @p_class_name = @p_name.camelize
    template 'scaffold/screen.rb', "app/screens/#{@p_name}.rb"
    template 'scaffold/model.rb', "app/models/#{@s_name}.rb"
    template 'scaffold/table.rb', "app/sections/#{@p_name}/index_table.rb"
    template 'scaffold/cell.rb', "app/sections/#{@p_name}/index_cell.rb"
    template 'scaffold/form.rb', "app/sections/#{@p_name}/form.rb"
    template 'scaffold/show.rb', "app/sections/#{@p_name}/show.rb"
    template 'scaffold/styles.rb', "app/styles/#{@p_name}.rb"
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
motion-prime-1.0.7 generators/scaffold_generator.rb
motion-prime-1.0.6 generators/scaffold_generator.rb
motion-prime-1.0.5 generators/scaffold_generator.rb
motion-prime-1.0.4 generators/scaffold_generator.rb
motion-prime-1.0.3 generators/scaffold_generator.rb
motion-prime-1.0.2 generators/scaffold_generator.rb
motion-prime-1.0.1 generators/scaffold_generator.rb
motion-prime-1.0.0 generators/scaffold_generator.rb
motion-prime-0.9.9.2 generators/scaffold_generator.rb
motion-prime-0.9.9.1 generators/scaffold_generator.rb
motion-prime-0.9.9 generators/scaffold_generator.rb
motion-prime-0.9.8 generators/scaffold_generator.rb
motion-prime-0.9.7 generators/scaffold_generator.rb
motion-prime-0.9.6 generators/scaffold_generator.rb
motion-prime-0.9.5 generators/scaffold_generator.rb