Skip to content

Commit

Permalink
Double-splat named parameter values
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Jan 8, 2021
1 parent 0867739 commit 1bc2174
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/helpers/blacklight/icon_helper_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Blacklight::IconHelperBehavior
def blacklight_icon(icon_name, options = {})
Rails.cache.fetch([:blacklight_icons, icon_name, options]) do
icon = Blacklight::Icon.new(icon_name, **options)
tag.span(icon.svg.html_safe, icon.options)
tag.span(icon.svg.html_safe, **icon.options)
end
end
end
2 changes: 1 addition & 1 deletion app/presenters/blacklight/facet_item_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def label
facet_config.query[value][:label]
elsif facet_config.date
localization_options = facet_config.date == true ? {} : facet_config.date
I18n.l(Time.zone.parse(value), localization_options)
I18n.l(Time.zone.parse(value), **localization_options)
else
value
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

RSpec.describe Blacklight::ConstraintLayoutComponent, type: :component do
subject(:render) do
render_inline(described_class.new(params))
render_inline(described_class.new(**params))
end

let(:rendered) do
Expand Down
2 changes: 1 addition & 1 deletion spec/models/blacklight/solr/response/facets_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
let(:facet) { { name: "foo", value: "bar", hits: 1 } }

before do
response.merge_facet(facet)
response.merge_facet(**facet)
end

context "facet does not already exist" do
Expand Down

0 comments on commit 1bc2174

Please sign in to comment.