lib/dry/schema/message_compiler.rb in dry-schema-0.1.0 vs lib/dry/schema/message_compiler.rb in dry-schema-0.1.1
- old
+ new
@@ -162,10 +162,10 @@
)
end
# @api private
def message_text(rule, template, tokens, opts)
- text = template % tokens
+ text = template[template.data(tokens)]
if full?
rule_name = rule ? (messages.rule(rule, opts) || rule) : (opts[:name] || opts[:path].last)
"#{rule_name} #{text}"
else