Sha256: 2870ac84786811791d5bd61b7f1f5d7c8fe036abf9b9cc5c869dd508c2f1c4c7

Contents?: true

Size: 595 Bytes

Versions: 9

Compression:

Stored size: 595 Bytes

Contents

# frozen_string_literal: true
require 'rails/generators'

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

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

    argument     :model_name, :type => :string , :default => "search_builder"

    desc <<-EOS
    This generator makes the following changes to your application:
     1. Creates a blacklight search builder in your /app/models directory
    EOS
    def create_search_builder
      template "search_builder.rb", "app/models/#{model_name}.rb"
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
blacklight-6.5.0 lib/generators/blacklight/search_builder_generator.rb
blacklight-6.4.2 lib/generators/blacklight/search_builder_generator.rb
blacklight-6.4.1 lib/generators/blacklight/search_builder_generator.rb
blacklight-6.4.0 lib/generators/blacklight/search_builder_generator.rb
blacklight-6.3.3 lib/generators/blacklight/search_builder_generator.rb
blacklight-6.3.1 lib/generators/blacklight/search_builder_generator.rb
blacklight-6.3.0 lib/generators/blacklight/search_builder_generator.rb
blacklight-6.2.0 lib/generators/blacklight/search_builder_generator.rb
blacklight-6.1.0 lib/generators/blacklight/search_builder_generator.rb