Class: Vanity::AddUniqueIndexesGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Vanity::AddUniqueIndexesGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/vanity/add_unique_indexes_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(path) ⇒ Object
8 9 10 |
# File 'lib/generators/vanity/add_unique_indexes_generator.rb', line 8 def self.next_migration_number(path) Time.now.utc.strftime("%Y%m%d%H%M%S") end |
Instance Method Details
#create_model_file ⇒ Object
12 13 14 |
# File 'lib/generators/vanity/add_unique_indexes_generator.rb', line 12 def create_model_file migration_template "add_unique_indexes_migration.rb", "db/migrate/add_vanity_unique_indexes.rb" end |