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

🐛 Fix Hyrax::ChangeSet.inspect method #6668

Merged
merged 1 commit into from
Feb 5, 2024
Merged

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Feb 5, 2024

Prior to this, there was no reference to model_class meaning that Hyrax::ChangeSet.inspect would raise an exception.

We need the binding of the resource_class, which is available during the creation of the class but not afterwards. In other words, by using the define_singleton_method we can leverage the provided resource_class as a bound value for the return value of .inspect.

Prior to this, there was no reference to `model_class` meaning that
`Hyrax::ChangeSet.inspect` would raise an exception.

We need the binding of the `resource_class`, which is available during
the creation of the class but not afterwards.  In other words, by using
the `define_singleton_method` we can leverage the provided
`resource_class` as a bound value for the return value of `.inspect`.
@jeremyf jeremyf merged commit 0ee1b47 into main Feb 5, 2024
6 checks passed
@jeremyf jeremyf deleted the fix-change-set-inspect branch February 5, 2024 21:40
@jeremyf jeremyf added the notes-bugfix Release Notes: Fixed a bug label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes-bugfix Release Notes: Fixed a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants