Class: ActsAsPublicable::Generators::MigrationGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/acts_as_publicable/migration_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(path) ⇒ Object



12
13
14
# File 'lib/generators/acts_as_publicable/migration_generator.rb', line 12

def self.next_migration_number(path)
    Time.now.utc.strftime("%Y%m%d%H%M%S")
end

Instance Method Details

#manifestObject



8
9
10
# File 'lib/generators/acts_as_publicable/migration_generator.rb', line 8

def manifest
    migration_template 'migration.rb', "db/migrate/add_published_to_#{table_name}"
end