Sha256: e7df59e980d86bc0b19e0dd7d66185066191229d17ce30d69045a4c23f731f7c

Contents?: true

Size: 469 Bytes

Versions: 2

Compression:

Stored size: 469 Bytes

Contents

# frozen_string_literal: true

module Europeana
  module Blacklight
    ##
    # URL routing for Europeana records
    class Routes
      def initialize(defaults = {})
        @defaults = defaults
      end

      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
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
europeana-blacklight-1.3.1 lib/europeana/blacklight/routes.rb
europeana-blacklight-1.3.0 lib/europeana/blacklight/routes.rb