Sha256: f9c965a5e747d00a7df5dddd9fcdabc14e38e481c9288623c9406a34e797b557

Contents?: true

Size: 682 Bytes

Versions: 7

Compression:

Stored size: 682 Bytes

Contents

module Wobapphelpers
  module Generators
    class ScaffoldTemplatesGenerator < Rails::Generators::Base
      source_root File.expand_path("../../templates", __FILE__)
      
      desc "Copy simple_form templates to your application"

      def copy_view_templates
        ["show.html.erb", "edit.html.erb", "new.html.erb", "index.html.erb", "_form.html.erb"].each do |file|
          copy_file "erb/scaffold/#{file}", "lib/templates/erb/scaffold/#{file}"
        end
      end

      def copy_controlle_template
          copy_file "rails/scaffold_controller/controller.rb", 
                    "lib/templates/rails/scaffold_controller/controller.rb"
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wobapphelpers-4.2.0 lib/generators/wobapphelpers/scaffold_templates_generator.rb
wobapphelpers-4.1.2 lib/generators/wobapphelpers/scaffold_templates_generator.rb
wobapphelpers-4.1.1 lib/generators/wobapphelpers/scaffold_templates_generator.rb
wobapphelpers-4.1.0 lib/generators/wobapphelpers/scaffold_templates_generator.rb
wobapphelpers-4.0.0 lib/generators/wobapphelpers/scaffold_templates_generator.rb
wobapphelpers-3.1.1 lib/generators/wobapphelpers/scaffold_templates_generator.rb
wobapphelpers-3.1.0 lib/generators/wobapphelpers/scaffold_templates_generator.rb