Sha256: ab39d183809b6126402b2f11209d9271106960aeb11d58ba0e6858f16193f7d8

Contents?: true

Size: 512 Bytes

Versions: 4

Compression:

Stored size: 512 Bytes

Contents

require "rails/generators/active_record"

module Mailkick
  module Generators
    class InstallGenerator < Rails::Generators::Base
      include ActiveRecord::Generators::Migration
      source_root File.join(__dir__, "templates")

      def copy_migration
        migration_template "install.rb", "db/migrate/install_mailkick.rb", migration_version: migration_version
      end

      def migration_version
        "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mailkick-0.4.3 lib/generators/mailkick/install_generator.rb
mailkick-0.4.2 lib/generators/mailkick/install_generator.rb
mailkick-0.4.1 lib/generators/mailkick/install_generator.rb
mailkick-0.4.0 lib/generators/mailkick/install_generator.rb