Sha256: 69f631e05c6aa4d477bc5c1d5334dd2bf1a72c06428d316c838d5c277617734a

Contents?: true

Size: 563 Bytes

Versions: 11

Compression:

Stored size: 563 Bytes

Contents

require "rails/generators/active_record"

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

        def copy_migration
          migration_template "migration.rb", "db/migrate/create_ahoy_clicks.rb", migration_version: migration_version
        end

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ahoy_email-2.4.0 lib/generators/ahoy/clicks/activerecord_generator.rb
ahoy_email-2.3.1 lib/generators/ahoy/clicks/activerecord_generator.rb
ahoy_email-2.3.0 lib/generators/ahoy/clicks/activerecord_generator.rb
ahoy_email-2.2.0 lib/generators/ahoy/clicks/activerecord_generator.rb
ahoy_email-2.1.3 lib/generators/ahoy/clicks/activerecord_generator.rb
ahoy_email-2.1.2 lib/generators/ahoy/clicks/activerecord_generator.rb
ahoy_email-2.1.1 lib/generators/ahoy/clicks/activerecord_generator.rb
ahoy_email-2.1.0 lib/generators/ahoy/clicks/activerecord_generator.rb
ahoy_email-2.0.3 lib/generators/ahoy/clicks/activerecord_generator.rb
ahoy_email-2.0.2 lib/generators/ahoy/clicks/activerecord_generator.rb
ahoy_email-2.0.1 lib/generators/ahoy/clicks/activerecord_generator.rb