Sha256: 07f2571e3541d197a0f91e83d165e69b214270461268efc5a4bd5b9b0aa7730f

Contents?: true

Size: 779 Bytes

Versions: 3

Compression:

Stored size: 779 Bytes

Contents

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

class ScaffoldhubGenerator < Rails::Generators::ScaffoldGenerator

  include Scaffoldhub::Helper

  remove_hook_for :scaffold_controller
  hook_for        :scaffold_controller, :as => :scaffoldhub

  remove_hook_for :orm
  hook_for        :orm, :as= => :scaffoldhub

  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 download_and_copy_other_files
    each_template_file(:other) do |other_template_file|
      template other_template_file.src, other_template_file.dest
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
scaffoldhub-0.0.4 lib/generators/scaffoldhub/scaffoldhub_generator.rb
scaffoldhub-0.0.3 lib/generators/scaffoldhub/scaffoldhub_generator.rb
scaffoldhub-0.0.2 lib/generators/scaffoldhub/scaffoldhub_generator.rb