Skip to content

Commit e2ef698

Browse files
authored
Add configuration instructions to README (#13)
To assist with any folks migrating over that modified options in `annotate_models.rake` or `annotate_routes.rake` OR used env variables.
1 parent 2902872 commit e2ef698

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.annotaterb.yml

Whitespace-only changes.

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,16 @@ Additional options that work for annotating models and routes
149149
150150
## Configuration
151151
152+
### Storing default options
153+
Previously in the [Annotate](https://github.com/ctran/annotate_models) you could pass options through the CLI or store them as environment variables. Annotaterb removes dependency on the environment variables and instead can read values from a `.annotaterb.yml` file stored in the Rails project root.
154+
155+
```yml
156+
# .annotaterb.yml
157+
158+
position: after
159+
```
160+
161+
Annotaterb reads first from the configuration file, if it exists, then merges it with any options passed into the CLI.
152162
153163
### How to skip annotating a particular model
154164
If you want to always skip annotations on a particular model, add this string

dummyapp/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
annotaterb (4.0.0)
4+
annotaterb (4.0.0.beta.1)
55

66
GEM
77
remote: https://rubygems.org/

0 commit comments

Comments
 (0)