Class: PasswordBreachAlertGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- PasswordBreachAlertGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/password_breach_alert_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_breaches_migration ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/generators/password_breach_alert_generator.rb', line 6 def create_breaches_migration time_now = Time.current.strftime('%Y%m%d%H%M%S') template_name = 'create_breaches' migration_file = "#{time_now}_#{template_name}" copy_file "#{template_name}.rb", File.join('db', 'migrate', "#{migration_file}.rb") end |