Class: Forge::Generators::I18nMigrationsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/forge/lib/generators/forge/i18n_migrations/i18n_migrations_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_filesObject



6
7
8
9
# File 'lib/forge/lib/generators/forge/i18n_migrations/i18n_migrations_generator.rb', line 6

def copy_files
  timestamp = Time.now.strftime('%Y%m%d%H%M%S')
  template("migration.rb", File.join('db/migrate', "#{timestamp}_add_i18n_fields_#{file_hash.capitalize}.rb"))
end