annotate_models
annotate_models copied to clipboard
Annotate namespaced models not working without --models
I was trying to get annotate to annotate a new model I created, which is namespaced. It wasn't working. After trying several other things, using the --models
caused it to correctly annotate the new model files.
IMHO, this should annotate the models without the --models option.
Commands
$ annotate
$ annotate --models
Annotated (6): ...
$
Version
- annotate (3.0.3)
- rails (5.2.3)
- ruby 2.6.5
I had the same problem, but with Rails 6.0.1. A new model was not annotated until I manually ran:
$ annotate --models
It wasn't annotated automatically upon migration, and I had also tried just:
$ annotate
A thought struck me: I had run bundle update
today. I checked and Annotate was one of the upgraded gems. I ran rails g annotate:install
and overwrote the existing file. It's working correctly now.
Running rails g annotate:install
also worked for me.
Apologize for the change in expectation. This was also brought up in #663. Right now my priorities on this project is to get the integration tests working before I get back into touching the actual code. Happy to review any PRs for this.