Sha256: f52376be6fda00b64bb6107887edc42360818224e0e362a528cc6f6eb71cd7f7

Contents?: true

Size: 526 Bytes

Versions: 1

Compression:

Stored size: 526 Bytes

Contents

require 'rubygems'
require 'active_record'

class ScaffoldGenerator < RubiGen::Base

  def initialize(runtime_args, runtime_options = {})
    super
    usage if args.empty?
    RubiGen::Scripts::Generate.new.run(args.clone, :generator => 'model')
    RubiGen::Scripts::Generate.new.run(args[0].pluralize.to_a, :generator => 'controller')
  end

  def manifest
    record do |m|
    end
  end

  protected
    def banner
      <<-EOS
USAGE: #{File.basename($0)} #{spec.name} ModelName [field:type, field:type]

EOS
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
newplugin-0.0.4 newplugin_generators/scaffold/scaffold_generator.rb