Sha256: 668f20be176a927653746d58fdef316b706b1775d4c3738f649eb3a934f6c695

Contents?: true

Size: 574 Bytes

Versions: 75

Compression:

Stored size: 574 Bytes

Contents

# frozen_string_literal: true
require 'rails/generators'

module Blacklight
  class DocumentGenerator < Rails::Generators::Base
    include Rails::Generators::Migration

    source_root File.expand_path('../templates', __FILE__)

    argument :model_name, type: :string, default: "solr_document"

    desc <<-EOS
      This generator makes the following changes to your application:
       1. Creates a blacklight document in your /app/models directory
    EOS

    def create_solr_document
      template "solr_document.rb", "app/models/#{model_name}.rb"
    end
  end
end

Version data entries

75 entries across 75 versions & 2 rubygems

Version Path
blacklight-7.40.0 lib/generators/blacklight/document_generator.rb
blacklight-7.39.0 lib/generators/blacklight/document_generator.rb
blacklight-7.38.0 lib/generators/blacklight/document_generator.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/lib/generators/blacklight/document_generator.rb
blacklight-7.37.0 lib/generators/blacklight/document_generator.rb
blacklight-7.36.2 lib/generators/blacklight/document_generator.rb
blacklight-7.36.1 lib/generators/blacklight/document_generator.rb
blacklight-7.36.0 lib/generators/blacklight/document_generator.rb
blacklight-7.35.0 lib/generators/blacklight/document_generator.rb
blacklight-7.34.0 lib/generators/blacklight/document_generator.rb
blacklight-7.33.1 lib/generators/blacklight/document_generator.rb
blacklight-7.33.0 lib/generators/blacklight/document_generator.rb
blacklight-7.32.0 lib/generators/blacklight/document_generator.rb
blacklight-7.31.0 lib/generators/blacklight/document_generator.rb
blacklight-7.30.0 lib/generators/blacklight/document_generator.rb
blacklight-7.29.0 lib/generators/blacklight/document_generator.rb
blacklight-7.28.0 lib/generators/blacklight/document_generator.rb
blacklight-7.27.1 lib/generators/blacklight/document_generator.rb
blacklight-7.27.0 lib/generators/blacklight/document_generator.rb
blacklight-7.26.1 lib/generators/blacklight/document_generator.rb