Sha256: 9f18edc2452c9c62f35ab3ab4cfa378a5e3ae8780cec402d216d8e6ca2dbd11c

Contents?: true

Size: 530 Bytes

Versions: 19

Compression:

Stored size: 530 Bytes

Contents

require "rails/generators/active_record"

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

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

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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
disco-0.5.0 lib/generators/disco/recommendation_generator.rb
disco-0.4.2 lib/generators/disco/recommendation_generator.rb
disco-0.4.0 lib/generators/disco/recommendation_generator.rb
disco-0.3.2 lib/generators/disco/recommendation_generator.rb
disco-0.3.1 lib/generators/disco/recommendation_generator.rb
disco-0.3.0 lib/generators/disco/recommendation_generator.rb
disco-0.2.9 lib/generators/disco/recommendation_generator.rb
disco-0.2.8 lib/generators/disco/recommendation_generator.rb
disco-0.2.7 lib/generators/disco/recommendation_generator.rb
disco-0.2.6 lib/generators/disco/recommendation_generator.rb
disco-0.2.5 lib/generators/disco/recommendation_generator.rb
disco-0.2.4 lib/generators/disco/recommendation_generator.rb
disco-0.2.3 lib/generators/disco/recommendation_generator.rb
disco-0.2.1 lib/generators/disco/recommendation_generator.rb
disco-0.2.0 lib/generators/disco/recommendation_generator.rb
disco-0.1.3 lib/generators/disco/recommendation_generator.rb
disco-0.1.2 lib/generators/disco/recommendation_generator.rb
disco-0.1.1 lib/generators/disco/recommendation_generator.rb
disco-0.1.0 lib/generators/disco/recommendation_generator.rb