Skip to content

Commit

Permalink
fix i18n at ruby 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yisizawa authored and scambra committed Jan 18, 2021
1 parent e0a00ac commit a9ccb70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_scaffold/extensions/localize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def as_(key, options = {})
if key.present?
scope = [:active_scaffold, *options.delete(:scope)]
options = options.reverse_merge(:scope => scope, :default => key.is_a?(String) ? key : key.to_s.titleize)
text = I18n.translate(key.to_s, options).html_safe # rubocop:disable Rails/OutputSafety
text = I18n.translate(key.to_s, **options).html_safe # rubocop:disable Rails/OutputSafety
# text = nil if text.include?('translation missing:')
end
text || key
Expand Down

0 comments on commit a9ccb70

Please sign in to comment.