samvera-deprecated / curation_concerns

A Hydra-based Rails Engine that extends an application, adding the ability to Create, Read, Update and Destroy (CRUD) objects (based on Hydra::Works) and providing a generator for defining object types with custom workflows, views, access controls, etc.
Other
15 stars 27 forks source link

url_for_document should return a routable entity, not a string #1082

Closed jcoyne closed 7 years ago

jcoyne commented 7 years ago

So that the value of url_for_document can be passed to polymorphic_url as seen here: https://github.com/projectblacklight/blacklight/blob/e7d7cb883e4d24a5263797cac47a8e5fd5b603ca/app/views/catalog/_document.rss.builder#L3

cbeer commented 7 years ago

Hm. That also seems like a blacklight bug. polymorphic_url was probably the wrong choice?

jcoyne commented 7 years ago

@cbeer I don't know, that seems exactly the correct usage according to http://api.rubyonrails.org/classes/ActionDispatch/Routing/PolymorphicRoutes.html. Or are you saying that url_for_document should be returning a string?

mjgiarlo commented 7 years ago

In the meantime, @cbeer, are you cool with this PR being merged? Or do you think we should be reaching down into Blacklight here?