annotate_models icon indicating copy to clipboard operation
annotate_models copied to clipboard

Fix automatic annotation of Active Admin models in migration task

Open d1ceward opened this issue 4 years ago • 2 comments

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

d1ceward avatar Oct 18 '21 13:10 d1ceward

Please add some tests.

ctran avatar Feb 03 '22 22:02 ctran

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.

d1ceward avatar Sep 20 '23 12:09 d1ceward