Add note about `config.annotations.register_directories` option in the guides [ci skip]

- Followup of #25692.
This commit is contained in:
Prathamesh Sonpatki 2016-07-10 20:42:50 +05:30
parent b76808602d
commit 816e15d626
No known key found for this signature in database
GPG Key ID: 8B90F6B89E2BCB71
1 changed files with 7 additions and 1 deletions

View File

@ -497,7 +497,13 @@ app/models/article.rb:
NOTE. When using specific annotations and custom annotations, the annotation name (FIXME, BUG etc) is not displayed in the output lines. NOTE. When using specific annotations and custom annotations, the annotation name (FIXME, BUG etc) is not displayed in the output lines.
By default, `rails notes` will look in the `app`, `config`, `db`, `lib` and `test` directories. If you would like to search other directories, you can provide them as a comma separated list in an environment variable `SOURCE_ANNOTATION_DIRECTORIES`. By default, `rails notes` will look in the `app`, `config`, `db`, `lib` and `test` directories. If you would like to search other directories, you can configure them using `config.annotations.register_directories` option.
```ruby
config.annotations.register_directories("spec", "vendor")
```
You can also provide them as a comma separated list in the environment variable `SOURCE_ANNOTATION_DIRECTORIES`.
```bash ```bash
$ export SOURCE_ANNOTATION_DIRECTORIES='spec,vendor' $ export SOURCE_ANNOTATION_DIRECTORIES='spec,vendor'