Sha256: fa9754a433d4bf2367110afeb1f57a1f60b3323a7568da0cd31df8b63296dc0f

Contents?: true

Size: 536 Bytes

Versions: 31

Compression:

Stored size: 536 Bytes

Contents

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 """
This generator makes the following changes to your application:
 1. Creates a blacklight document in your /app/models directory
"""
    def create_solr_document
      template "solr_document.rb", "app/models/#{model_name}.rb"
    end

  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
blacklight-5.19.2 lib/generators/blacklight/document_generator.rb
blacklight-5.19.1 lib/generators/blacklight/document_generator.rb
blacklight-5.19.0 lib/generators/blacklight/document_generator.rb
blacklight-5.18.0 lib/generators/blacklight/document_generator.rb
blacklight-5.17.2 lib/generators/blacklight/document_generator.rb
blacklight-6.0.0.pre5 lib/generators/blacklight/document_generator.rb
blacklight-5.17.1 lib/generators/blacklight/document_generator.rb
blacklight-5.17.0 lib/generators/blacklight/document_generator.rb
blacklight-6.0.0.pre4 lib/generators/blacklight/document_generator.rb
blacklight-5.16.4 lib/generators/blacklight/document_generator.rb
blacklight-6.0.0.pre3 lib/generators/blacklight/document_generator.rb
blacklight-5.16.3 lib/generators/blacklight/document_generator.rb
blacklight-5.16.2 lib/generators/blacklight/document_generator.rb
blacklight-5.16.1 lib/generators/blacklight/document_generator.rb
blacklight-6.0.0.pre2 lib/generators/blacklight/document_generator.rb
blacklight-6.0.0.pre1 lib/generators/blacklight/document_generator.rb
blacklight-5.16.0 lib/generators/blacklight/document_generator.rb
blacklight-5.15.0 lib/generators/blacklight/document_generator.rb
blacklight-5.14.0 lib/generators/blacklight/document_generator.rb
blacklight-5.13.1 lib/generators/blacklight/document_generator.rb