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 creation of records for Rails 7.2 version #177

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

w-zygmuntowicz
Copy link
Contributor

@w-zygmuntowicz w-zygmuntowicz commented Sep 27, 2024

Fixes #174

I'm not sure what's going to happen when someone is using the audited gem besides the audits provided by the motor-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 the motor-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 because klass.reflections had keys which were strings, however klass._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.

@omohokcoj
Copy link
Member

@w-zygmuntowicz thanks

@omohokcoj omohokcoj merged commit 28e58ec into motor-admin:master Oct 4, 2024
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.

[Rails 7.2] Association named 'audits' was not found on Model; perhaps you misspelled it?
2 participants