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

Annotate namespaced models not working without --models #689

Open
softwaregravy opened this issue Nov 16, 2019 · 4 comments
Open

Annotate namespaced models not working without --models #689

softwaregravy opened this issue Nov 16, 2019 · 4 comments
Labels

Comments

@softwaregravy
Copy link

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
@philliplongman
Copy link

philliplongman commented Nov 20, 2019

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

@philliplongman
Copy link

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.

@JoeHampton
Copy link

Running rails g annotate:install also worked for me.

@drwl
Copy link
Collaborator

drwl commented Jan 15, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants