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

🎁 Config option for coercing a factory class name #901

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Jan 26, 2024

Prior to this commit, once we had a factory class name we always called #constantize on the string.

With this commit, we retain that default behavior by:

  1. Introducing a function that does this thing
  2. Exposing a configuration end-point for that function

Further, we add a looming Valkyrie convention; namely that for each legacy named model (e.g. Work) there will likely be a corresponding model with the Resrouce suffix (e.g. WorkResource).

Related to:

Prior to this commit, once we had a factory class name we always called
`#constantize` on the string.

With this commit, we retain that default behavior by:

1. Introducing a function that does this thing
2. Exposing a configuration end-point for that function

Further, we add a looming Valkyrie convention; namely that for each
legacy named model (e.g. `Work`) there will likely be a corresponding
model with the Resrouce suffix (e.g. `WorkResource`).

Related to:

- scientist-softserv/hykuup_knapsack#125
@jeremyf jeremyf added the patch-ver for release notes label Jan 26, 2024
@jeremyf jeremyf merged commit acb0138 into main Jan 26, 2024
7 checks passed
@jeremyf jeremyf deleted the adding-valkyrie-coercion branch January 26, 2024 16:06
jeremyf added a commit that referenced this pull request Jan 26, 2024
* main:
  🎁 Config option for coercing a factory class name (#901)
  ♻️ Extract Bulkrax::FactoryClassFinder (#900)
  📚 Adding documentation for configuration (#896)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-ver for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants