Class: Blacklight::Routes::Searchable
- Inherits:
-
Object
- Object
- Blacklight::Routes::Searchable
- Defined in:
- lib/blacklight/routes/searchable.rb
Instance Method Summary collapse
- #call(mapper, _options = {}) ⇒ Object
-
#initialize(defaults = {}) ⇒ Searchable
constructor
A new instance of Searchable.
Constructor Details
#initialize(defaults = {}) ⇒ Searchable
Returns a new instance of Searchable.
6 7 8 |
# File 'lib/blacklight/routes/searchable.rb', line 6 def initialize(defaults = {}) @defaults = defaults end |
Instance Method Details
#call(mapper, _options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/blacklight/routes/searchable.rb', line 10 def call(mapper, = {}) 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 |