From 377529f3ad422c1a4731be5d7b1c19e530552e5e Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Sun, 25 Jan 2026 08:57:28 +0000 Subject: [PATCH] Fix Ruby 3 I18n.t ArgumentError Co-authored-by: superiorlu --- lib/generators/jsonapi/swagger/swagger_generator.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/generators/jsonapi/swagger/swagger_generator.rb b/lib/generators/jsonapi/swagger/swagger_generator.rb index 62bab17..bfee938 100644 --- a/lib/generators/jsonapi/swagger/swagger_generator.rb +++ b/lib/generators/jsonapi/swagger/swagger_generator.rb @@ -154,15 +154,15 @@ def relation_table_name(relation) return relation.name if relation.respond_to?(:name) end - def t(key, options={}) - content = tt(key, options) + def t(key, **options) + content = tt(key, **options) safe_encode(content) end - def tt(key, options={}) + def tt(key, **options) options[:scope] = :jsonapi_swagger options[:default] = key.to_s.humanize - I18n.t(key, options) + I18n.t(key, **options) end def safe_encode(content)