annotate_models
annotate_models copied to clipboard
Allow annotations at bottom of file
Describe your problem here. I'd like to config so that annotations are appended to the bottom of the file, rather than the top.
Commands
annotate --models
Version
- annotate version
3.2 - rails version
7.0.3 - ruby version
2.7.4
It's already there:
-p [before|top|after|bottom], Place the annotations at the top (before) or the bottom (after) of the model/test/fixture/factory/route/serializer file(s)
--position
--pc, --position-in-class [before|top|after|bottom]
Place the annotations at the top (before) or the bottom (after) of the model file
--pf, --position-in-factory [before|top|after|bottom]
Place the annotations at the top (before) or the bottom (after) of any factory files
--px, --position-in-fixture [before|top|after|bottom]
Place the annotations at the top (before) or the bottom (after) of any fixture files
--pt, --position-in-test [before|top|after|bottom]
Place the annotations at the top (before) or the bottom (after) of any test files
--pr, --position-in-routes [before|top|after|bottom]
Place the annotations at the top (before) or the bottom (after) of the routes.rb file
--ps, --position-in-serializer [before|top|after|bottom]
Place the annotations at the top (before) or the bottom (after) of the serializer files
Or in the rake task file, use 'position_in_class' => 'bottom', etc. in Annotate.set_defaults.