From c083d729af29565007e1d2b0070648d16ae405f7 Mon Sep 17 00:00:00 2001 From: Ermolaev Andrey Date: Tue, 9 Jul 2024 01:11:59 +0300 Subject: [PATCH] readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ec4276d..6a035e3 100644 --- a/README.md +++ b/README.md @@ -215,7 +215,7 @@ class NestedDryForm < Form required(:price).filled(:integer) optional(:description).maybe(:string) optional(:upload_attachments).maybe(:array) - optional(:bookmarks).array(Dry.Types::Instance(BookmarkForm)) + optional(:bookmarks).array(Dry.Types.Constructor(BookmarkForm) { |params| BookmarkForm.new(params: params) }) end end @@ -232,7 +232,7 @@ class NestedDryForm < Form end ``` -As you noticed in the above example, we use the construction `Dry.Types::Instance(BookmarkForm)`, +As you noticed in the above example, we use the construction `Dry.Types.Constructor(BookmarkForm) { |params| BookmarkForm.new(params: params) }`, what it is `dry types` you can find out [here](https://dry-rb.org/gems/dry-types)