Skip to content

Commit 437361a

Browse files
committed
Test on Blacklight 9
1 parent 3ca5d0c commit 437361a

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.github/workflows/ruby.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ jobs:
1818
additional_engine_cart_rails_options: ["-j importmap"]
1919
additional_name: [""]
2020
include:
21+
- rails_version: "~> 8.0"
22+
ruby: "3.4"
23+
blacklight_version: "~> 9.0.0.beta7"
24+
additional_engine_cart_rails_options: "-j importmap"
25+
additional_name: Blacklight 9 beta
2126
- rails_version: "~> 7.2"
2227
ruby: "3.3"
2328
blacklight_version: "~> 8.0"

app/controllers/concerns/spotlight/search_helper.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@
33
module Spotlight
44
# ...
55
module SearchHelper
6+
# @param [Hash] user_params the query parameters used to reconstitute the search state
7+
# from saved searches. If not provided, will use the search_state from the view context
8+
# or an empty hash if that is not available.
9+
# @return [Object] An instance of the configured search service
610
def search_service(user_params = respond_to?(:search_state, true) ? search_state.to_h : {})
11+
state = Blacklight::SearchState.new(user_params, blacklight_config)
712
klass = respond_to?(:search_service_class) ? search_service_class : Blacklight::SearchService
813

9-
klass.new(config: blacklight_config, user_params:, **search_service_context)
14+
klass.new(config: blacklight_config, search_state: state, **search_service_context)
1015
end
1116

1217
# @return [Hash] a hash of context information to pass through to the search service

app/controllers/spotlight/pages_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def _prefixes
121121
# @param [Hash] the query parameters
122122
# @return [Object] the search results object from the configured search service
123123
def search_results(user_params)
124-
search_service(user_params).search_results
124+
search_service(search_state: Blacklight::SearchState.new(user_params, blacklight_config)).search_results
125125
end
126126

127127
def undo_link

0 commit comments

Comments
 (0)