Sha256: d1c7f461e3fab505c055af329ac367d74306194a5c3e04a07cc0f06c94b8b67c

Contents?: true

Size: 525 Bytes

Versions: 5

Compression:

Stored size: 525 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/create_mailkick_subscriptions.rb", migration_version: migration_version
      end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mailkick-1.1.2 lib/generators/mailkick/install_generator.rb
mailkick-1.1.1 lib/generators/mailkick/install_generator.rb
mailkick-1.1.0 lib/generators/mailkick/install_generator.rb
mailkick-1.0.1 lib/generators/mailkick/install_generator.rb
mailkick-1.0.0 lib/generators/mailkick/install_generator.rb