Class: Europeana::Blacklight::Routes
- Inherits:
-
Object
- Object
- Europeana::Blacklight::Routes
- Defined in:
- lib/europeana/blacklight/routes.rb
Overview
URL routing for Europeana records
Instance Method Summary collapse
- #call(mapper, _options = {}) ⇒ Object
-
#initialize(defaults = {}) ⇒ Routes
constructor
A new instance of Routes.
Constructor Details
#initialize(defaults = {}) ⇒ Routes
Returns a new instance of Routes.
8 9 10 |
# File 'lib/europeana/blacklight/routes.rb', line 8 def initialize(defaults = {}) @defaults = defaults end |
Instance Method Details
#call(mapper, _options = {}) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/europeana/blacklight/routes.rb', line 12 def call(mapper, = {}) mapper.constraints id: %r{[^/]+/[^/]+} do mapper.post 'record/*id/track', action: 'track', as: 'track' mapper.get 'record/*id', action: 'show', as: 'show' end end |