Sha256: 00413d55d66910edc494d2204817bf886edad1ca1de3bfd746725abf3d558520

Contents?: true

Size: 750 Bytes

Versions: 17

Compression:

Stored size: 750 Bytes

Contents

# frozen_string_literal: true

module Blacklight
  module Routes
    class Searchable
      def initialize(defaults = {})
        @defaults = defaults
      end

      def call(mapper, _options = {})
        mapper.match '/', action: 'index', as: 'search', via: [:get, :post]
        mapper.get '/advanced', action: 'advanced_search', as: 'advanced_search'
        mapper.get '/page_links', action: 'page_links', as: 'page_links'

        mapper.post ":id/track", action: 'track', as: 'track'
        mapper.get ":id/raw", action: 'raw', as: 'raw', defaults: { format: 'json' }

        mapper.get "opensearch"
        mapper.get 'suggest', as: 'suggest_index'
        mapper.get "facet/:id", action: 'facet', as: 'facet'
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

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