Class: DynamicLinks::Generators::AddKgsMigrationGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- DynamicLinks::Generators::AddKgsMigrationGenerator
- Defined in:
- lib/generators/dynamic_links/add_kgs_migration_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_migration_file ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/generators/dynamic_links/add_kgs_migration_generator.rb', line 6 def create_migration_file = Time.now.utc.strftime("%Y%m%d%H%M%S") migration_filename = "#{}_add_available_to_shortened_urls.rb" migration_template = File.read(File.join(self.class.source_root, "migration_template.rb")) create_file "db/migrate/#{migration_filename}", migration_template end |