Class: IprogOtpGenerator::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- IprogOtpGenerator::Generators::InstallGenerator
- Defined in:
- lib/generators/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_migration ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/generators/install_generator.rb', line 13 def copy_migration model = model_name.constantize table_name = model.table_name = Time.now.utc.strftime("%Y%m%d%H%M%S") migration_template "migration.rb.tt", "db/migrate/add_otp_fields_to#{table_name}.rb", migration_version: migration_version, table_name: table_name end |