lib/grape/exceptions/base.rb in grape-1.0.2 vs lib/grape/exceptions/base.rb in grape-1.0.3
- old
+ new
@@ -69,9 +69,11 @@
key
end
end
def translate(key, **options)
+ options = options.dup
+ options[:default] &&= options[:default].to_s
message = ::I18n.translate(key, **options)
message.present? ? message : ::I18n.translate(key, locale: FALLBACK_LOCALE, **options)
end
end
end