Unable to annotate a single model
Opened this issue · 1 comments
mehboobali98 commented
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 commented
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.