Class: TCB::Generators::OutboxGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/tcb/outbox/outbox_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_jobObject



16
17
18
# File 'lib/generators/tcb/outbox/outbox_generator.rb', line 16

def create_job
  template "job.rb.tt", "app/jobs/#{job_file_name}.rb"
end

#create_migrationObject



11
12
13
14
# File 'lib/generators/tcb/outbox/outbox_generator.rb', line 11

def create_migration
  timestamp = Time.now.utc.strftime("%Y%m%d%H%M%S")
  template "migration.rb.tt", "db/migrate/#{timestamp}_create_#{table_name}.rb"
end