class Europeana::Blacklight::Routes

URL routing for Europeana records

Public Class Methods

new(defaults = {}) click to toggle source
# File lib/europeana/blacklight/routes.rb, line 8
def initialize(defaults = {})
  @defaults = defaults
end

Public Instance Methods

call(mapper, _options = {}) click to toggle source
# File lib/europeana/blacklight/routes.rb, line 12
def call(mapper, _options = {})
  mapper.constraints id: %r{[^/]+/[^/]+} do
    mapper.post 'record/*id/track', action: 'track', as: 'track'
    mapper.get 'record/*id', action: 'show', as: 'show'
  end
end