Class: Timelines::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/timelines/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_application_policyObject



6
7
8
9
10
11
12
13
# File 'lib/generators/timelines/install/install_generator.rb', line 6

def copy_application_policy
  [
    "create_timelines_events.rb"
  ].each_with_index do |migration_file, index|
    timestamp = (Time.current + index + 1).strftime("%Y%m%d%H%M%S")
    template migration_file, "db/migrate/#{timestamp}_#{migration_file}.rb"
  end
end