Sha256: 8722eba60459f8754fa926f7a0e6f7ef27d006dbf95552b81b2f8436d7b87771

Contents?: true

Size: 489 Bytes

Versions: 10

Compression:

Stored size: 489 Bytes

Contents

require 'rails/generators'
require 'rails/generators/active_record'
require 'rails/generators/migration'

class LadyJosephineMigrationGenerator < Rails::Generators::NamedBase
  include Rails::Generators::Migration
  source_root File.expand_path('../templates', __FILE__)

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

  def copy_model_migration
    migration_template "migration.rb", "db/migrate/add_lady_josephine_to_#{table_name}.rb"
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
lady_josephine-0.7.0 lib/generators/lady_josephine_migration/lady_josephine_migration_generator.rb
lady_josephine-0.6.3 lib/generators/lady_josephine_migration/lady_josephine_migration_generator.rb
lady_josephine-0.6.2 lib/generators/lady_josephine_migration/lady_josephine_migration_generator.rb
lady_josephine-0.6.1 lib/generators/lady_josephine_migration/lady_josephine_migration_generator.rb
lady_josephine-0.6.0 lib/generators/lady_josephine_migration/lady_josephine_migration_generator.rb
lady_josephine-0.5.0 lib/generators/lady_josephine_migration/lady_josephine_migration_generator.rb
lady_josephine-0.0.4 lib/generators/lady_josephine_migration/lady_josephine_migration_generator.rb
lady_josephine-0.0.3 lib/generators/lady_josephine_migration/lady_josephine_migration_generator.rb
lady_josephine-0.0.2 lib/generators/lady_josephine_migration/lady_josephine_migration_generator.rb
lady_josephine-0.0.1 lib/generators/lady_josephine_migration/lady_josephine_migration_generator.rb