Skip to content

Commit 253ebf1

Browse files
committed
Address code review feedback
1 parent d86e5d9 commit 253ebf1

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

app/controllers/search_controller.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def results
2121
else
2222
params[:tab] || 'primo' # Default to primo for new tabbed interface
2323
end
24+
@enhanced_query = Enhancer.new(params).enhanced_query
2425

2526
# Route to appropriate search based on active tab
2627
if Flipflop.enabled?(:gdt)
@@ -39,7 +40,6 @@ def results
3940
private
4041

4142
def load_gdt_results
42-
@enhanced_query = Enhancer.new(params).enhanced_query
4343
query = QueryBuilder.new(@enhanced_query).query
4444

4545
response = cache_timdex_query(query)
@@ -52,11 +52,6 @@ def load_gdt_results
5252
end
5353

5454
def load_primo_results
55-
@enhanced_query = Enhancer.new(params).enhanced_query
56-
@errors = nil
57-
@results = []
58-
@pagination = nil
59-
6055
begin
6156
primo_search = PrimoSearch.new
6257
per_page = params[:per_page] || 20
@@ -79,7 +74,6 @@ def load_primo_results
7974
end
8075

8176
def load_timdex_results
82-
@enhanced_query = Enhancer.new(params).enhanced_query
8377
query = QueryBuilder.new(@enhanced_query).query
8478
response = cache_timdex_query(query)
8579

app/views/search/results.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<%= content_for(:title, Flipflop.enabled?(:gdt) ? results_page_title(@enhanced_query) : results_page_title({ q: params[:q] })) %>
1+
<%= content_for(:title, results_page_title(@enhanced_query)) %>
22

33
<% content_for :additional_meta_tag do %>
44
<meta name="robots" content="noindex, nofollow" />

0 commit comments

Comments
 (0)