-
Notifications
You must be signed in to change notification settings - Fork 655
annotate --routes changes model files #357
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
Comments
I believe the behaviour you described is like that by design. |
If by design, why inconsistent between two versions? If I annotate routes, it violates my expectations to see model files modified. |
Why not only annotating the routes when calling annotate_models/lib/annotate.rb Line 116 in 6775e4a
|
Ah, I misread the existing behavior. |
* annotate --routes modifies only routes.rb This change is a proposed solution to #357 and an alternative to the already proposed solution #361. In #361 it is needed to call `annotate --routes --ignore-models` to achieve the same as in this change with only `annotate --routes`. * Call eager_load only when models are included This to prevent activerecord model errors when using mongoid for example and calling `annotate --routes`
@aminariana I've tested your issue using:
I ran Regards. |
When I do a simple:
annotate --routes
I expect only the
routes.rb
file to change, not the model annotations. But they do.My usage hasn't changed from previous versions of annotate. But going from
v2.6.10
tov2.7
, when I run the command, it overrides my existing model annotations with fresh ones, without the desired options such as annotating indexes that I otherwise specify in annotating models. Breaking change I think?EDIT:
Downgrading to v2.6.10 fixes the problem.
The text was updated successfully, but these errors were encountered: