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

map SolrDocument#collection? to configured class #5214

Merged
merged 1 commit into from
Oct 23, 2021
Merged

Conversation

no-reply
Copy link
Contributor

using #collection? on the hydra_model turns out to be useless, since
hydra_model is actually a Class, not a model instance.

instead just respect whatever model is configured. trust that
SolrDocument#hydra_model will get resolved to the configured class.

@samvera/hyrax-code-reviewers

@no-reply no-reply force-pushed the collection-solr-doc branch 3 times, most recently from 85444e6 to 9025ea1 Compare October 21, 2021 16:41
using `#collection?` on the `hydra_model` turns out to be useless, since
`hydra_model` is actually a Class, not a model instance.

instead just respect whatever model is configured. trust that
`SolrDocument#hydra_model` will get resolved to the configured class.
no-reply pushed a commit that referenced this pull request Oct 22, 2021
the tests for this controller were not sufficiently granular to make debugging
easy. i encountered this working on Collection support for Valkyrie (where these
tests are failing seemingly due to #5214). it took me some time to understand
what was going wrong, so i wanted to make the tests clearer by following the
one-expectation-per-spec-block pattern.
no-reply pushed a commit that referenced this pull request Oct 22, 2021
the tests for this controller were not sufficiently granular to make debugging
easy. i encountered this working on Collection support for Valkyrie (where these
tests are failing seemingly due to #5214). it took me some time to understand
what was going wrong, so i wanted to make the tests clearer by following the
one-expectation-per-spec-block pattern.
@no-reply no-reply merged commit d55b356 into main Oct 23, 2021
@no-reply no-reply deleted the collection-solr-doc branch October 23, 2021 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants