These are chat archives for dry-rb/chat

May 2017
Tim Riley
May 29 2017 02:21
Folks, we’re going to be releasing some big changes to dry-transaction soon. Read about them here ( and let us know if you have any thoughts.
Gustavo Caso
May 29 2017 05:29
Awesome @timriley
Gustavo Caso
May 29 2017 06:01
I created the first of a series of post talking about dry-web-roda and all the libraries involves to make it work any thoughts, comments, typos etc.. will be much appreciated
Ricardo Bernardeli
May 29 2017 22:55

Hi all. I'm not sure this is the right channel to ask for help. I'm unsure whether I found a bug in dry-validations or I'm misusing it.

require "dry-struct"
require "dry-types"
require "dry-validation"

module Types
  include Dry::Types.module


class Flags < Dry::Struct::Value
  attribute :admin, Types::Strict::Bool

PersonValidation = Dry::Validation.Schema {

output ={})

puts output.to_either

=> /Users/ric/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/dry-validation-0.10.7/lib/dry/validation/message_set.rb:113:in `[]': no implicit conversion of Symbol into Integer (TypeError)

The expectation was Left({:name=>["is missing"], :flags=>["is missing"]}). Am I missing anything or I hit a bug with schemas + to_either?

Please let me know if this isn't the right channel, and I'll move to the appropriate place. :)
Nikita Shilnikov
May 29 2017 23:02
@bernardeli this is the right place :)
please file an issue via GH, I'll address it
for know you can work around this with to_either(hints: false)
I think this should the default behavior
Ricardo Bernardeli
May 29 2017 23:14
Thanks @flash-gordon