It’s a little fussy with URL helpers, as you need to always specify
ark_tag
or you’ll get an error:
ark_path(ark_tag: ‘ark:’, id: 1234)
You’ll probably want to define your own helpers that hide that.
The other, bigger issue is the OTHER features of the ARK spec that are
going to confuse & annoy the default URL parser. In particular:
the dot-separated components of VariantPath elements. The default
Rails
behavior appends a .:format optional parameter to the route. This doesn’t allow further dots.
the ? and ?? suffixes. The single question-mark, in particular, is
only detectable if you check the original request URI in the Rack
request.
I’m also unsure how to talk the regular path helpers into producing a
single-question-mark URL.
If you’re building an application which relies on complex routing of ARK
URLs, you may want to consider writing your own Rack middleware to
hijack
the URL parsing process and transmute them into something more palatable
to
the existing router.
–Matt J.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.