Skip to content

Commit a59e532

Browse files
committed
Pass search_state object to SearchService instead of params hash
1 parent 459d721 commit a59e532

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/controllers/concerns/spotlight/search_helper.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ module Spotlight
44
# ...
55
module SearchHelper
66
def search_service(user_params = respond_to?(:search_state, true) ? search_state.to_h : {})
7+
search_state = Blacklight::SearchState.new(user_params, blacklight_config)
78
klass = respond_to?(:search_service_class) ? search_service_class : Blacklight::SearchService
89

9-
klass.new(config: blacklight_config, user_params:, **search_service_context)
10+
klass.new(config: blacklight_config, search_state:, **search_service_context)
1011
end
1112

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

0 commit comments

Comments
 (0)