class PasswordBreachAlertGenerator

Public Instance Methods

create_breaches_migration() click to toggle source
# 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