Sha256: 8eac1d0bc614d22dbd7d2a6241d4390002caa62f4051c9b6eec767fda2bae545

Contents?: true

Size: 575 Bytes

Versions: 21

Compression:

Stored size: 575 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

21 entries across 21 versions & 2 rubygems

Version Path
blacklight-8.6.1 lib/generators/blacklight/document_generator.rb
blacklight-8.6.0 lib/generators/blacklight/document_generator.rb
blacklight-8.5.1 lib/generators/blacklight/document_generator.rb
blacklight-8.5.0 lib/generators/blacklight/document_generator.rb
blacklight-8.4.0 lib/generators/blacklight/document_generator.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/lib/generators/blacklight/document_generator.rb
blacklight-8.3.0 lib/generators/blacklight/document_generator.rb
blacklight-8.2.2 lib/generators/blacklight/document_generator.rb
blacklight-8.2.1 lib/generators/blacklight/document_generator.rb
blacklight-8.2.0 lib/generators/blacklight/document_generator.rb
blacklight-8.1.0 lib/generators/blacklight/document_generator.rb
blacklight-8.0.1 lib/generators/blacklight/document_generator.rb
blacklight-8.0.0 lib/generators/blacklight/document_generator.rb
blacklight-8.0.0.beta8 lib/generators/blacklight/document_generator.rb
blacklight-8.0.0.beta7 lib/generators/blacklight/document_generator.rb
blacklight-8.0.0.beta6 lib/generators/blacklight/document_generator.rb
blacklight-8.0.0.beta5 lib/generators/blacklight/document_generator.rb
blacklight-8.0.0.beta4 lib/generators/blacklight/document_generator.rb
blacklight-8.0.0.beta3 lib/generators/blacklight/document_generator.rb
blacklight-8.0.0.beta2 lib/generators/blacklight/document_generator.rb