Sha256: c437115356c14bc3c3c2fc2556138c4f6409b7bd03be8ec0724ab35cef56963c

Contents?: true

Size: 552 Bytes

Versions: 5

Compression:

Stored size: 552 Bytes

Contents

require "rails/generators"
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.3.1 lib/generators/mailkick/install_generator.rb
mailkick-1.3.0 lib/generators/mailkick/install_generator.rb
mailkick-1.2.2 lib/generators/mailkick/install_generator.rb
mailkick-1.2.1 lib/generators/mailkick/install_generator.rb
mailkick-1.2.0 lib/generators/mailkick/install_generator.rb