These are chat archives for dry-rb/chat

27th
Sep 2016
Piotr Solnica
@solnic
Sep 27 2016 00:16
@UberMouse this looks like a bug :(
Taylor Lodge
@UberMouse
Sep 27 2016 00:16
Good to know I'm not just being silly haha
Piotr Solnica
@solnic
Sep 27 2016 00:16
lemme try to repro this
Taylor Lodge
@UberMouse
Sep 27 2016 00:16
Want me to raise an issue for it?
Piotr Solnica
@solnic
Sep 27 2016 00:26
no thanks, I’ve fixed it already
Taylor Lodge
@UberMouse
Sep 27 2016 00:27
Great, that was quick :)
Piotr Solnica
@solnic
Sep 27 2016 00:28
simple fix :)
I’ll push 0.10.3 with this fix
Taylor Lodge
@UberMouse
Sep 27 2016 00:35
Yay, custom predicate is working now :) cheers
Piotr Solnica
@solnic
Sep 27 2016 00:37
cool
Omer Katz
@thedrow
Sep 27 2016 12:31
Hi, Why am I getting uninitialized constant Dry::Types::Struct even if dry-types is required?
I can’t find Dry::Types::Struct in the code base as well
Is the documentation out of date?
Nikita Shilnikov
@flash-gordon
Sep 27 2016 12:49
@thedrow Struct has been extracted to https://github.com/dry-rb/dry-struct
Omer Katz
@thedrow
Sep 27 2016 12:49
@flash-gordon I figured that out. But the documentation is misleading
Nikita Shilnikov
@flash-gordon
Sep 27 2016 13:10
yeah, we need to update it
Sergey Kukunin
@Kukunin
Sep 27 2016 15:50
Can you tell me type_specs equivalent for required(:agent).schema(UI::ContactPersonSchema)? I tried required(:agent, :schema) but it doesn't work
required(:agent, UI::ContactPersonSchema).schema(UI::ContactPersonSchema) raises exception
Piotr Solnica
@solnic
Sep 27 2016 16:05
@Kukunin the same syntax works. No need for anything special in this case
Sergey Kukunin
@Kukunin
Sep 27 2016 16:06
can I use non type_specs schemas for nested attributes within type_specs schema?
It seems I can't
Sergey Kukunin
@Kukunin
Sep 27 2016 16:33
Is there a way to split coercing and validation in dry-types as well?
For example, I have UI::Coercible::UsaPhone which derives from Strict::String with constrained and constructor on it. And I need to set it twicely in schema: optional(:phone, [:nil, UI::Coercible::UsaPhone]).maybe(UI::Coercible::UsaPhone)