Skip to content

Commit

Permalink
Merge pull request #644 from FTLam11/637-update-external-dependencies…
Browse files Browse the repository at this point in the history
…-doc

Mention dry-initializer on external dependencies page
  • Loading branch information
timriley authored May 11, 2020
2 parents 4e4d87a + dce426f commit ed573ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docsite/source/external-dependencies.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ name: dry-validation

It's common to use external services that are needed for various validation rules. A good example is using objects that give you access to the database. Whenever you need to access such services, you can levarage `Dry::Validation::Contract.option`.

> The `option` method is provided by [dry-initializer](/gems/dry-initializer).
Let's say you use an API client object that can perform address validation - we can define it as an external dependency that will be injected to the contract's constructor:

```ruby
Expand Down

0 comments on commit ed573ff

Please sign in to comment.