Skip to content

Commit 12e48ad

Browse files
authored
Merge pull request #17 from superiorlu/opencode/issue12-20260125085540
Fix Ruby 3 I18n.t ArgumentError
2 parents e425ffa + 377529f commit 12e48ad

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/generators/jsonapi/swagger/swagger_generator.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ def relation_table_name(relation)
154154
return relation.name if relation.respond_to?(:name)
155155
end
156156

157-
def t(key, options={})
158-
content = tt(key, options)
157+
def t(key, **options)
158+
content = tt(key, **options)
159159
safe_encode(content)
160160
end
161161

162-
def tt(key, options={})
162+
def tt(key, **options)
163163
options[:scope] = :jsonapi_swagger
164164
options[:default] = key.to_s.humanize
165-
I18n.t(key, options)
165+
I18n.t(key, **options)
166166
end
167167

168168
def safe_encode(content)

0 commit comments

Comments
 (0)