These are chat archives for dry-rb/chat

8th
Aug 2017
Valentin Trinqué
@ValentinTrinque
Aug 08 2017 14:06
Hi guys, quick question, How can you manage to have default value in dry-validation ?
Gustavo Caso
@GustavoCaso
Aug 08 2017 14:09
Don't if is the best solution but you could create a custom Type with default value
like
ArticleStatus = Types::Strict::String
                    .default('draft')
                    .enum('draft', 'published')
Valentin Trinqué
@ValentinTrinque
Aug 08 2017 14:17
@GustavoCaso Ok thanks !
Sergey Prikhodko
@prikha
Aug 08 2017 16:14
BTW Guys, what do you think - dry-transaction is used inside a controller to keep it as slim as possible. So the question is: should serialization be a step inside transaction. Or it is not intended to be there?