@@ -41,20 +41,24 @@ Also, if you pass the -r option, it'll annotate routes.rb with the output of "ra
41
41
42
42
== INSTALL
43
43
44
+ Into Gemfile from rubygems.org:
45
+
46
+ gem 'annotate', ">=2.5.0.pre1"
47
+
44
48
Into Gemfile from Github:
45
49
46
- gem 'annotate', :git => 'git://github.com/MrJoy /annotate_models.git'
50
+ gem 'annotate', :git => 'git://github.com/ctran /annotate_models.git'
47
51
48
52
Into environment gems From rubygems.org:
49
53
50
54
gem install annotate
51
55
52
56
Into environment gems from Github checkout:
53
57
54
- git clone git://github.com/MrJoy /annotate_models.git annotate_models
55
- cd annotate_models
56
- rake build
57
- gem install pkg/annotate-*.gem
58
+ git clone git://github.com/ctran /annotate_models.git annotate_models
59
+ cd annotate_models
60
+ rake build
61
+ gem install pkg/annotate-*.gem
58
62
59
63
== USAGE
60
64
@@ -63,23 +67,23 @@ Into environment gems from Github checkout:
63
67
To annotate all your models, tests, fixtures, etc.:
64
68
65
69
cd /path/to/app
66
- annotate_models
70
+ annotate
67
71
68
72
To annotate your models and tests:
69
73
70
- annotate_models --exclude fixtures
74
+ annotate --exclude fixtures
71
75
72
76
To annotate just your models:
73
77
74
- annotate_models --exclude tests,fixtures
78
+ annotate --exclude tests,fixtures
75
79
76
80
To annotate routes.rb:
77
81
78
- annotate_models -r
82
+ annotate -r
79
83
80
84
To remove annotations:
81
85
82
- annotate_models -d
86
+ annotate -d
83
87
84
88
To automatically annotate after running 'rake db:migrate', ensure you've added
85
89
annotate_models to your Rails project's Gemfile, and run this:
@@ -110,14 +114,15 @@ anywhere in the file:
110
114
-R, --require path Additional files to require before loading models
111
115
-e [tests,fixtures] Skip annotation of fixtures/factories/test files
112
116
--exclude
113
- -n --no-sort Sort by column creation order rather than alphabetical order
117
+ --sort Sort by alphabetical order rather than column creation order
118
+
114
119
115
120
== SORTING
116
121
117
- By default, columns will be sorted alphabetically so that the results of
118
- annotation are consistent regardless of what order migrations are executed in.
122
+ By default, columns will be sorted in database order (i.e. the order in which migrations were run).
119
123
120
- If you prefer the old behavior, use --no-sort.
124
+ If you prefer to sort alphabetically so that the results of
125
+ annotation are consistent regardless of what order migrations are executed in, use --sort.
121
126
122
127
== WARNING
123
128
0 commit comments