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 --routes modifies only routes.rb #485

Merged
merged 2 commits into from
Jul 12, 2017
Merged

Conversation

Hitabis
Copy link
Contributor

@Hitabis Hitabis commented Jul 11, 2017

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.

Hitabis added 2 commits July 11, 2017 09:29
This change is a proposed solution to ctran#357 and an alternative to the already proposed solution ctran#361.
In ctran#361 it is needed to call `annotate --routes --ignore-models` to achieve the same as in this change with only `annotate --routes`.
This to prevent activerecord model errors when using mongoid for example and calling `annotate --routes`
@ctran
Copy link
Owner

ctran commented Jul 12, 2017

Does this mean I can't do both routes and models now?

@Hitabis
Copy link
Contributor Author

Hitabis commented Jul 12, 2017

Yes, that's what I would expect from:

@ctran
Copy link
Owner

ctran commented Jul 12, 2017

I misunderstood the previous behavior. I'll merge this in. Thanks.

@ctran ctran added this to the v2.7.3 milestone Jul 12, 2017
@ctran ctran merged commit 5e3820b into ctran:develop Jul 12, 2017
@Hitabis Hitabis deleted the patch-1 branch July 19, 2017 12:59
@Hitabis
Copy link
Contributor Author

Hitabis commented Nov 7, 2017

@ctran Any updates on the v2.7.3 release?

@Hitabis Hitabis restored the patch-1 branch November 7, 2017 10:16
@jjercx
Copy link

jjercx commented Nov 30, 2018

This means if I 'routes' => 'true' in auto_annotate_models.rake, it won't work with my models?

drwl added a commit that referenced this pull request Sep 3, 2019
Prior to this change, `Annotate.include_models?` returned the inverse of `Annotate.include_routes?`. This made it so annotating models and routes was not possible to do together.

This PR adds an explicit `--models` flag and also adds it the option to `lib/generators/annotate/templates/auto_annotate_models.rake` with the default being set to `false`. 

Fixes #563 and undoes the bug introduced in #485.
peterfication pushed a commit to store2be/annotate_models that referenced this pull request Jan 20, 2020
Prior to this change, `Annotate.include_models?` returned the inverse of `Annotate.include_routes?`. This made it so annotating models and routes was not possible to do together.

This PR adds an explicit `--models` flag and also adds it the option to `lib/generators/annotate/templates/auto_annotate_models.rake` with the default being set to `false`. 

Fixes ctran#563 and undoes the bug introduced in ctran#485.
vfonic pushed a commit to vfonic/annotate_models that referenced this pull request May 8, 2020
Prior to this change, `Annotate.include_models?` returned the inverse of `Annotate.include_routes?`. This made it so annotating models and routes was not possible to do together.

This PR adds an explicit `--models` flag and also adds it the option to `lib/generators/annotate/templates/auto_annotate_models.rake` with the default being set to `false`. 

Fixes ctran#563 and undoes the bug introduced in ctran#485.
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

Successfully merging this pull request may close these issues.

3 participants