Sha256: 80f871916c04694fe5f2e757ea8c0ce7d4e2cfeb2739881525cf7ed632df7bd7

Contents?: true

Size: 418 Bytes

Versions: 1

Compression:

Stored size: 418 Bytes

Contents

# frozen_string_literal: true

module Voting
  class InstallGenerator < Rails::Generators::Base
    source_root File.expand_path('templates', __dir__)

    desc 'creates Voting migration'

    def create_migration
      template 'db/migrate/create_voting_tables.rb', "db/migrate/#{timestamp}_create_voting_tables.rb"
    end

    private

    def timestamp
      Time.current.strftime '%Y%m%d%H%M%S'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
voting-0.5.0 lib/generators/voting/install_generator.rb