Skip to content

Commit

Permalink
Merge pull request #1121 from kolide/master
Browse files Browse the repository at this point in the history
Fix Ruby 2.7 deprecation warnings
  • Loading branch information
scarroll32 authored May 11, 2020
2 parents 2b62ace + ab069a9 commit 90dd40d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ransack/translate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def attribute(key, options = {})

defaults << options.delete(:default) if options[:default]
options.reverse_merge! count: 1, default: defaults
I18n.translate(defaults.shift, options.merge(interpolations))
I18n.translate(defaults.shift, **options.merge(interpolations))
end

def association(key, options = {})
Expand All @@ -67,7 +67,7 @@ def association(key, options = {})
end
defaults << context.traverse(key).model_name.human
options = { :count => 1, :default => defaults }
I18n.translate(defaults.shift, options)
I18n.translate(defaults.shift, **options)
end

private
Expand All @@ -83,7 +83,7 @@ def attribute_name(context, name, include_associations = nil)
options = { count: 1, default: defaults }
interpolations = build_interpolations(associated_class)

I18n.translate(defaults.shift, options.merge(interpolations))
I18n.translate(defaults.shift, **options.merge(interpolations))
end

def default_attribute_name
Expand Down

0 comments on commit 90dd40d

Please sign in to comment.