Skip to content

Commit ceb9dc4

Browse files
committed
Fix ruby 2.7 deprecation warning
1 parent 7aeff5d commit ceb9dc4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/human_attribute_values/human_attribute_value.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def human_attribute_value(attribute, options = {})
1111
module ClassMethods
1212
def human_attribute_value(attribute, value, options = {})
1313
return '' if value.nil? || value == ''
14+
1415
options = {count: 1}.merge!(options)
1516
parts = attribute.to_s.split('.')
1617
attribute = parts.pop
@@ -36,7 +37,7 @@ def human_attribute_value(attribute, value, options = {})
3637
defaults << value.to_s
3738

3839
options[:default] = defaults
39-
I18n.translate(defaults.shift, options)
40+
I18n.translate(defaults.shift, **options)
4041
end
4142
end
4243
end

0 commit comments

Comments
 (0)