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.7.0 lib/generators/blacklight/document_generator.rb
blacklight-7.6.0 lib/generators/blacklight/document_generator.rb
blacklight-7.5.1 lib/generators/blacklight/document_generator.rb
blacklight-7.5.0 lib/generators/blacklight/document_generator.rb
blacklight-7.4.2 lib/generators/blacklight/document_generator.rb
blacklight-7.4.1 lib/generators/blacklight/document_generator.rb
blacklight-7.4.0 lib/generators/blacklight/document_generator.rb
blacklight-7.3.0 lib/generators/blacklight/document_generator.rb
blacklight-7.2.0 lib/generators/blacklight/document_generator.rb
blacklight-7.1.0 lib/generators/blacklight/document_generator.rb
blacklight-7.1.0.alpha lib/generators/blacklight/document_generator.rb
blacklight-7.0.1 lib/generators/blacklight/document_generator.rb
blacklight-7.0.0 lib/generators/blacklight/document_generator.rb
blacklight-7.0.0.rc2 lib/generators/blacklight/document_generator.rb
blacklight-7.0.0.rc1 lib/generators/blacklight/document_generator.rb