class RailsWorkflow::Generators::InstallGenerator

Public Class Methods

next_migration_number(_path) click to toggle source
# File lib/generators/rails_workflow/install/install_generator.rb, line 13
def self.next_migration_number(_path)
  if @prev_migration_nr
    @prev_migration_nr += 1
  else
    @prev_migration_nr = Time.now.utc.strftime('%Y%m%d%H%M%S').to_i
  end
  @prev_migration_nr.to_s
end

Public Instance Methods

copy_migrations() click to toggle source
# File lib/generators/rails_workflow/install/install_generator.rb, line 22
def copy_migrations
  migration_template 'create_workflow_processes.rb', 'db/migrate/create_workflow_processes.rb'
end