Sha256: 519d1ed7501c00eb0f9f92a6e92d6fdcc12833c4fc3f9bffaaed31355260f377
Contents?: true
Size: 597 Bytes
Versions: 4
Compression:
Stored size: 597 Bytes
Contents
module Cms class MigrationGenerator < ::Rails::Generators::NamedBase include ::Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) class_option :path, type: :string, default: 'cms/migrate', desc: 'Relative path to Rails.root where to place the migration file. Defaults to "cms/migrate".', banner: 'PATH' def self.next_migration_number(dirname) Time.now.utc.strftime('%Y%m%d%H%M%S') end def create_migration_file migration_template('migration.erb', "#{options[:path]}/#{file_name}") end end end
Version data entries
4 entries across 4 versions & 1 rubygems