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 automatic annotation of Active Admin models in migration task #907

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

d1ceward
Copy link

@d1ceward d1ceward commented Oct 18, 2021

This pull request fixes an issue where automatic annotation of Active Admin models was not working with the migration task (cf. auto_annotate.rake), even though the active_admin option was set to true in the :set_annotation_options method.

The fix involves adding the active_admin option to the options variable generated by set_annotation_options(). This variable is then passed to AnnotateModels.do_annotations(), ensuring that the active admin option is set.

Fixes #777

@ctran
Copy link
Owner

ctran commented Feb 3, 2022

Please add some tests.

@d1ceward d1ceward changed the title Fix active_admin option not working with auto annotate models task Fix automatic annotation of Active Admin models in migration task Sep 20, 2023
@d1ceward
Copy link
Author

I understand that you're requesting tests for this change. Unfortunately, I don't know how to test this piece of code because it requires a dummy Rails app and I never done something similar. If you have any tips, please let me know.

In the meantime, I'm confident that my changes are correct because I've carefully tested them manually and because the code is relatively simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ActiveAdmin resources don't get annotated after migrations
2 participants