Skip to content

Added --ignore-models option for skipping models annotation #361

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

Closed
wants to merge 1 commit into from

Conversation

kamilbielawski
Copy link
Contributor

Solves #357

@coveralls
Copy link

Coverage Status

Coverage remained the same at 72.939% when pulling 8f7beea on kamilbielawski:ignore-models into ec05bf6 on ctran:develop.

@ctran
Copy link
Owner

ctran commented Apr 1, 2016

Thanks for the PR but I was thinking of moving away from using the "exclude" options and use a "types" flag to allow individual types to be annotated. It would have a default list of "types" to preserve the current behavior. Want to implement that?

@kamilbielawski
Copy link
Contributor Author

Yeah, I wasn't really convinced that adding this --ignore-models switch is a good idea but it was the simplest way to achieve functionality requested in the issue #357 .
I can implement --types flag, although it might take a while as I don't know when I find some time to do it.

@Hitabis
Copy link
Contributor

Hitabis commented Jul 10, 2017

Is this expected to be merged into the master branch? I'm also having the same problem described in #357 and would be happy to see issue #357 closed soon.

Hitabis added a commit to Hitabis/annotate_models that referenced this pull request Jul 11, 2017
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`.
@ctran
Copy link
Owner

ctran commented Jul 12, 2017

The master branch merge will only happen when I do a release. Can you point to the dev branch?

ctran pushed a commit that referenced this pull request Jul 12, 2017
* 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`
@ctran ctran closed this Jan 22, 2019
@ctran ctran added the released label Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants