Skip to content

Commit 5da7964

Browse files
authored
Add upgrade instructions to README (ctran#687)
Updates the readme to include a note about upgrading the gem to version 3 and that it can default to doing nothing.
1 parent 23c56ec commit 5da7964

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.rdoc

+19
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,25 @@ It also annotates geometrical columns, geom type and srid, when using
5050
Also, if you pass the -r option, it'll annotate routes.rb with the output of
5151
<code>rake routes</code>.
5252

53+
== Upgrading to 3.X and annotate models not working?
54+
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
55+
{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].
56+
57+
There are a few ways of fixing this.
58+
If using CLI explicitly pass in models flag using +--models+
59+
60+
OR
61+
62+
a) Running
63+
rails g annotate:install
64+
will overwrite your defaults with the annotating models option set to true.
65+
66+
b) In +lib/tasks/auto_annotate_models.rake+ add the models key-value option:
67+
68+
Annotate.set_defaults(
69+
...
70+
'models' => 'true',
71+
...
5372

5473
== Install
5574

0 commit comments

Comments
 (0)