Skip to content

Commit 377529f

Browse files
Fix Ruby 3 I18n.t ArgumentError
Co-authored-by: superiorlu <superiorlu@users.noreply.github.com>
1 parent e425ffa commit 377529f

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)