Fix creation of records for Rails 7.2 version #177
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #174
I'm not sure what's going to happen when someone is using the
audited
gem besides the audits provided by themotor-admin
gem. Is the initializer a good place to go? Maybe a better way would be to create a generator which would be triggered during update and/or installation of themotor-admin
gem with additional messages for end users?Regarding the change in the
fetch_configured_model.rb
file, this one failed when using the Rails 7.2. That was becauseklass.reflections
had keys which were strings, howeverklass._reflections
should have symbolized keys in Rails 7.2.Edit:
Regarding the audited issue. Maybe event better alternative would be to configure the class as an abstract class on and off inside a transaction? That way the behaviour would be benign, the end user wouldn't have to worry about the audited issue at all.