SearchWorks icon indicating copy to clipboard operation
SearchWorks copied to clipboard

Load the collection in the controller

Open jcoyne opened this issue 5 months ago • 2 comments

Interfacing with external services like solr ought to be done in the controller rather than in the view

jcoyne avatar Jul 15 '25 15:07 jcoyne

Does this PR have implications for how other components are loading page_location ? They should continue to load as a helper as in:

https://github.com/sul-dlss/SearchWorks/blob/b834d0f7faf48b023b8d4a2a32e8dbbdb9bf5da9/app/components/searchworks4/digital_collections_facet_header_component.rb#L5

https://github.com/sul-dlss/SearchWorks/blob/b834d0f7faf48b023b8d4a2a32e8dbbdb9bf5da9/app/components/searchworks4/search_result/collection_info_component.rb#L14

marlo-longley avatar Jul 17 '25 18:07 marlo-longley

@marlo-longley no, I don't think anything is changed about it. Its still in the helper context.

jcoyne avatar Jul 18 '25 19:07 jcoyne