Sha256: d99507fdb89ff13cfb0c229a48bce1dc95aa6d397e1871fd80b4f900b7b45bce

Contents?: true

Size: 790 Bytes

Versions: 13

Compression:

Stored size: 790 Bytes

Contents

module JsonVoorhees
	class EngineScaffoldGenerator < Rails::Generators::Base
	  source_root File.expand_path('../templates', __FILE__)
	  argument :module_name, :type => :string
	  argument :resource_name, :type => :string
	  argument :api_version, :type => :string, :default => "1"
	  argument :attributes, type: :array, default: [], banner: "field:type field:type"

	  def sprint
		  run "rails g json_voorhees:engine_create_controller #{module_name} #{resource_name} #{api_version} #{attributes.join(" ")}"
		  run "rails g json_voorhees:engine_create_serializer #{module_name} #{resource_name} #{api_version} #{attributes.join(" ")}"
		  run "rails g json_voorhees:engine_create_model #{module_name} #{resource_name} #{api_version} #{attributes.join(" ")}"
	  end

	  private

	end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
json_voorhees-1.5.1 lib/generators/json_voorhees/engine_scaffold/engine_scaffold_generator.rb
json_voorhees-1.5.0 lib/generators/json_voorhees/engine_scaffold/engine_scaffold_generator.rb
json_voorhees-1.4.9 lib/generators/json_voorhees/engine_scaffold/engine_scaffold_generator.rb
json_voorhees-1.4.8 lib/generators/json_voorhees/engine_scaffold/engine_scaffold_generator.rb
json_voorhees-1.4.7 lib/generators/json_voorhees/engine_scaffold/engine_scaffold_generator.rb
json_voorhees-1.4.6 lib/generators/json_voorhees/engine_scaffold/engine_scaffold_generator.rb
json_voorhees-1.4.5 lib/generators/json_voorhees/engine_scaffold/engine_scaffold_generator.rb
json_voorhees-1.4.2 lib/generators/json_voorhees/engine_scaffold/engine_scaffold_generator.rb
json_voorhees-1.4.1 lib/generators/json_voorhees/engine_scaffold/engine_scaffold_generator.rb
json_voorhees-1.4.0 lib/generators/json_voorhees/engine_scaffold/engine_scaffold_generator.rb
json_voorhees-1.3.2 lib/generators/json_voorhees/engine_scaffold/engine_scaffold_generator.rb
json_voorhees-1.3.1 lib/generators/json_voorhees/engine_scaffold/engine_scaffold_generator.rb
json_voorhees-1.3.0 lib/generators/json_voorhees/engine_scaffold/engine_scaffold_generator.rb