Skip to content

Add upgrade instructions to README #687

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

Merged
merged 4 commits into from
Dec 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,25 @@ It also annotates geometrical columns, geom type and srid, when using
Also, if you pass the -r option, it'll annotate routes.rb with the output of
<code>rake routes</code>.

== Upgrading to 3.X and annotate models not working?
In versions 2.7.X the annotate gem defaulted to annotating models if no arguments were passed in. The annotate gem by default would not allow for routes and models to be annotated together. A
{change was added in #647}[link:https://github.com/ctran/annotate_models/pull/647]. You {can read more here}[https://github.com/ctran/annotate_models/issues/663].

There are a few ways of fixing this.
If using CLI explicitly pass in models flag using +--models+

OR

a) Running
rails g annotate:install
will overwrite your defaults with the annotating models option set to true.

b) In +lib/tasks/auto_annotate_models.rake+ add the models key-value option:

Annotate.set_defaults(
...
'models' => 'true',
...

== Install

Expand Down