Skip to content

Commit

Permalink
Modify error message behavior for Sets
Browse files Browse the repository at this point in the history
  • Loading branch information
eriklovmo committed Dec 25, 2024
1 parent 8cb064f commit cb13784
Show file tree
Hide file tree
Showing 3 changed files with 920 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dry/schema/message_compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def message_text(template, tokens, options)
def message_tokens(args)
tokens = args.each_with_object({}) do |arg, hash|
case arg[1]
when Array
when Array, Set
hash[arg[0]] = arg[1].join(LIST_SEPARATOR)
when Range
hash["#{arg[0]}_left".to_sym] = arg[1].first
Expand Down
Loading

0 comments on commit cb13784

Please sign in to comment.