From 5846791ee120c9ae9055d5b99d24eff88d8db7c5 Mon Sep 17 00:00:00 2001 From: Jonathan Rochkind Date: Mon, 2 Dec 2024 13:14:09 -0500 Subject: [PATCH] take params from config to override to nil, to avoid unpermitted params. --- app/presenters/blacklight_range_limit/facet_item_presenter.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/presenters/blacklight_range_limit/facet_item_presenter.rb b/app/presenters/blacklight_range_limit/facet_item_presenter.rb index 5a30aac..e7c5d54 100644 --- a/app/presenters/blacklight_range_limit/facet_item_presenter.rb +++ b/app/presenters/blacklight_range_limit/facet_item_presenter.rb @@ -13,7 +13,8 @@ def label # # https://github.com/projectblacklight/blacklight_range_limit/issues/296 def href(path_options = {}) - super(path_options.merge(range_end: nil, range_field: nil, range_start: nil)) + override_to_nil = BlacklightRangeLimit::ControllerOverride::RANGE_LIMIT_FIELDS.collect { |f| [f, nil] }.to_h + super(path_options.merge(override_to_nil)) end private