Sha256: c493b22cdddd9d6054a000ff54b4223dc4f517f0b3846c64fda684f92e3b2da7

Contents?: true

Size: 666 Bytes

Versions: 3

Compression:

Stored size: 666 Bytes

Contents

require 'rails/generators/erb/scaffold/scaffold_generator'

module Erb
  class ScaffoldhubGenerator < Erb::Generators::ScaffoldGenerator

    include Scaffoldhub::Helper

    class_option :scaffold, :default => 'default', :banner => "SCAFFOLD_NAME",  :type => :string,  :desc => "Scaffold to use"
    class_option :local,    :default => false,     :banner => "LOCAL SCAFFOLD", :type => :boolean, :desc => "Use a local scaffold, not scaffoldhub.org"

    def copy_view_files
      each_template_file(:view) do |erb_template_file|
        template erb_template_file.src, File.join("app/views", controller_file_path, erb_template_file.dest)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
scaffoldhub-0.0.11 lib/generators/erb/scaffoldhub_generator.rb
scaffoldhub-0.0.10 lib/generators/erb/scaffoldhub_generator.rb
scaffoldhub-0.0.8 lib/generators/erb/scaffoldhub_generator.rb