lib/dry/schema/messages.rb in dry-schema-1.11.0 vs lib/dry/schema/messages.rb in dry-schema-1.11.1
- old
+ new
@@ -17,10 +17,10 @@
backend_class = BACKENDS.fetch(config.backend) do
raise "+#{config.backend}+ is not a valid messages identifier"
end
namespace = config.namespace
- options = config.to_h.select { |k, _| Abstract.settings.include?(k) }
+ options = config.to_h.select { |k, _| Abstract.settings.map(&:name).include?(k) }
messages = Messages.const_get(backend_class).build(options)
return messages.namespaced(namespace) if namespace