Sha256: 549b60db75a238deaa5c751d69a70534d0bf37be85fbde33bc5a405277dd7f69
Contents?: true
Size: 657 Bytes
Versions: 52
Compression:
Stored size: 657 Bytes
Contents
require 'rails_generator/base' require 'rails_generator/generators/components/migration/migration_generator' class ExtensionMigrationGenerator < MigrationGenerator attr_accessor :extension_name def initialize(runtime_args, runtime_options = {}) runtime_args = runtime_args.dup @extension_name = runtime_args.shift super(runtime_args, runtime_options) end def banner "Usage: #{$0} extension_migration ExtensionName MigrationName [field:type, field:type]" end def extension_path File.join('vendor', 'extensions', @extension_name.underscore) end def destination_root File.join(Rails.root, extension_path) end end
Version data entries
52 entries across 52 versions & 1 rubygems