Sha256: 189399784ead63a69b30e14fde88e71fdf820206166540552e7d81e1b755e01d
Contents?: true
Size: 785 Bytes
Versions: 4
Compression:
Stored size: 785 Bytes
Contents
module Europeana module Blacklight ## # URL routing for Blacklight module Routes extend ActiveSupport::Concern included do |klass| klass.default_route_sets -= [:solr_document] unless klass.default_route_sets.include?(:europeana_document) klass.default_route_sets += [:europeana_document] end end def europeana_document(primary_resource) add_routes do |options| args = { only: [:show] } args[:constraints] = options[:constraints] if options[:constraints] post 'record/*id/track', args.merge(to: "#{primary_resource}#track", as: 'track_document') get 'record/*id', args.merge(to: "#{primary_resource}#show", as: 'document') end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems