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

Unable to annotate a single model #989

Open
mehboobali98 opened this issue Jun 25, 2023 · 1 comment
Open

Unable to annotate a single model #989

mehboobali98 opened this issue Jun 25, 2023 · 1 comment

Comments

@mehboobali98
Copy link

Describe your problem here.

Unable to annotate a single model. Tried with the following commands and nothing happens.

Commands

$ show your commands here.
`annotate --exclude tests,fixtures,factories -i app/models/my_model.rb`
`annotate --exclude tests,fixtures,factories -i MyModel`

Version

  • annotate version: 3.2.0
  • rails version: 6.0.3.2
  • ruby version: 2.7.1
@pupudesu
Copy link

pupudesu commented Apr 18, 2024

Hello! I had a similar problem back then and figured that I can get a specific model annotated by doing this:
annotate --models app/models/my_model.rb

This command annotated the model, factory, and spec files in my case.

# annotate --models app/models/my_model.rb

Output:

Annotated (3): app/models/my_model.rb, spec/models/my_model_spec.rb, spec/factories/my_model.rb

You should be able to adjust it as you need if you want to exclude other files.

I think the readme should have mentioned this single model use case to make it more beginner friendly.

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