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

Allow annotations at bottom of file #963

Open
cheddachedda opened this issue Jul 12, 2022 · 1 comment
Open

Allow annotations at bottom of file #963

cheddachedda opened this issue Jul 12, 2022 · 1 comment

Comments

@cheddachedda
Copy link

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
@alexeyr-ci1
Copy link

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.

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

No branches or pull requests

2 participants