lib/dry/schema/messages/i18n.rb in dry-schema-1.3.2 vs lib/dry/schema/messages/i18n.rb in dry-schema-1.3.3
- old
+ new
@@ -77,9 +77,18 @@
end
self
end
+ # @api private
+ def cache_key(predicate, options)
+ if options[:locale]
+ super
+ else
+ [*super, I18n.locale]
+ end
+ end
+
private
# @api private
def store_translations(data)
locales = data.keys.map(&:to_sym)