Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Ruby 2.7 deprecation warnings #1121

Merged
merged 1 commit into from
May 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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