Sha256: 927733fee5ebe34cb3675254da971d4ef35474a04d6da7bbdc5ec89aa5213026

Contents?: true

Size: 411 Bytes

Versions: 43

Compression:

Stored size: 411 Bytes

Contents

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

class VanityGenerator < Rails::Generators::Base
  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 create_model_file
    migration_template "vanity_migration.rb", "db/migrate/vanity_migration.rb"
  end
end

Version data entries

43 entries across 43 versions & 4 rubygems

Version Path
vanity-2.2.10 lib/generators/vanity_generator.rb
vanity-2.2.9 lib/generators/vanity_generator.rb
vanity-2.2.8 lib/generators/vanity_generator.rb
vanity-2.2.7 lib/generators/vanity_generator.rb
vanity-2.2.6 lib/generators/vanity_generator.rb
vanity-2.2.4 lib/generators/vanity_generator.rb
vanity-2.2.3 lib/generators/vanity_generator.rb
vanity-2.2.2 lib/generators/vanity_generator.rb
vanity-2.2.1 lib/generators/vanity_generator.rb
vanity-2.2.0 lib/generators/vanity_generator.rb
vanity-2.1.2 lib/generators/vanity_generator.rb
vanity-2.1.1 lib/generators/vanity_generator.rb
vanity-2.1.0 lib/generators/vanity_generator.rb
vanity-2.0.1 lib/generators/vanity_generator.rb
vanity-2.0.0 lib/generators/vanity_generator.rb
vanity-2.0.0.beta9 lib/generators/vanity_generator.rb
vanity-1.9.3 lib/generators/vanity_generator.rb
vanity-1.9.2 lib/generators/vanity_generator.rb
vanity-2.0.0.beta8 lib/generators/vanity_generator.rb
vanity-1.8.4 lib/generators/vanity_generator.rb