Sha256: c29e2ebb2257373355358cb91d78f06e113b77ccfb17ac3f1a66d88d2cb3bd6e

Contents?: true

Size: 663 Bytes

Versions: 3

Compression:

Stored size: 663 Bytes

Contents

# based heavily on BlacklightAdvancedSearch::AdvancedController
module NewspaperWorks
  class NewspapersSearchController < CatalogController
    def search_builder_class
      NewspaperWorks::NewspapersSearchBuilder
    end

    def search
      @response = newspaper_search_facets
    end

    private

      # we need this for proper routing of search forms/links
      def search_action_url(*args)
        main_app.search_catalog_url(*args)
      end

      def newspaper_search_facets
        response, = search_results(params) do |search_builder|
          search_builder.except(:add_advanced_search_to_solr)
        end
        response
      end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
newspaper_works-1.0.1 app/controllers/newspaper_works/newspapers_search_controller.rb
newspaper_works-1.0.0 app/controllers/newspaper_works/newspapers_search_controller.rb
newspaper_works-0.1.0 app/controllers/newspaper_works/newspapers_search_controller.rb