You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rdoc
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ Also, if you pass the -r option, it'll annotate routes.rb with the output of
51
51
52
52
Into Gemfile from rubygems.org:
53
53
54
-
gem 'annotate', '~> 2.6.10'
54
+
gem 'annotate'
55
55
56
56
Into Gemfile from Github:
57
57
@@ -100,9 +100,7 @@ To remove routes.rb annotations:
100
100
101
101
annotate --routes --delete
102
102
103
-
104
-
== Configuration
105
-
103
+
To automatically annotate every time you run +db:migrate+, either run +rails g annotate:install+ or add +Annotate.load_tasks+ to your `Rakefile`. See the [configuration in Rails](#configuration-in-rails) section for more info.
106
104
107
105
=== Usage Outside of Rails
108
106
@@ -112,7 +110,6 @@ or more +--model-dir+ options to inform annotate about the structure of your
112
110
project and help it bootstrap and load the relevant code.
113
111
114
112
115
-
116
113
== Configuration
117
114
118
115
If you want to always skip annotations on a particular model, add this string
@@ -130,7 +127,13 @@ default options:
130
127
Edit this file to control things like output format, where annotations are
131
128
added (top or bottom of file), and in which artifacts.
132
129
133
-
== Rails Integration
130
+
The generated rakefile +lib/tasks/auto_annotate_models.rake+ also contains
131
+
`Annotate.load_tasks`. This adds a few rake tasks which duplicate command-line
132
+
functionality:
133
+
134
+
rake annotate_models # Add schema information (as comments) to model and fixture files
135
+
rake annotate_routes # Adds the route map to routes.rb
136
+
rake remove_annotation # Remove schema information from model and fixture files
134
137
135
138
By default, once you've generated a configuration file, annotate will be
136
139
executed whenever you run +rake db:migrate+ (but only in development mode).
0 commit comments