Sha256: ef49c00111f8bd64b111d6bcb49eeec5701029dd98dd12659050bbb869c4558c
Contents?: true
Size: 658 Bytes
Versions: 130
Compression:
Stored size: 658 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
130 entries across 130 versions & 1 rubygems