Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace calls to ActiveFedora::Base.search_by_id #3935

Merged
merged 4 commits into from
Sep 20, 2019

Conversation

lsitu
Copy link
Contributor

@lsitu lsitu commented Aug 29, 2019

Fixes #3822

Replace calls to ActiveFedora::Base.search_by_id with Hyrax::Base.search_by_id.

@samvera/hyrax-code-reviewers

@lsitu lsitu added the wings label Aug 30, 2019
@lsitu lsitu changed the title WIP: Replace calls to ActiveFedora::Base.search_by_id Replace calls to ActiveFedora::Base.search_by_id Aug 30, 2019
app/models/hyrax/base.rb Outdated Show resolved Hide resolved
@@ -0,0 +1,11 @@
module Hyrax
class Base
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it make sense for this to live in a Base class? What about pushing this into a search service?

I think it would be worth looking about in services/hyrax to see if there's already a natural home for this functionality.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, both existing calls seem like they're weird optimizations, designed to avoid loading data from fedora. I wonder if we couldn't refactor them away?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@no-reply I've moved it to Hyrax::SolrService class since the behavior of the method is related to SOLR search. And yes, it seems like something that we could refactor at some point later.

@lsitu lsitu force-pushed the active_fedora_search_by_id branch 4 times, most recently from 6fabf64 to 78c858e Compare September 19, 2019 19:46
@no-reply no-reply merged commit b51bb38 into master Sep 20, 2019
@no-reply no-reply deleted the active_fedora_search_by_id branch September 20, 2019 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace calls to ActiveFedora::Base.search_by_id (removes 2 refs to ActiveFedora)
2 participants