diff --git a/app/controllers/searches_controller.rb b/app/controllers/searches_controller.rb index b1418174d..ad9f7a690 100644 --- a/app/controllers/searches_controller.rb +++ b/app/controllers/searches_controller.rb @@ -11,7 +11,7 @@ class SearchesController < ApplicationController private def perform_search - @search_results = Current.user.search(@query_terms).limit(50) + set_page_and_extract_portion_from Current.user.search(@query_terms) @recent_search_queries = Current.user.search_queries.order(updated_at: :desc).limit(10) end end diff --git a/app/views/collections/show/_filtered_cards.html.erb b/app/views/collections/show/_filtered_cards.html.erb index 7a20bbc86..63afd2920 100644 --- a/app/views/collections/show/_filtered_cards.html.erb +++ b/app/views/collections/show/_filtered_cards.html.erb @@ -1,5 +1,5 @@
- <%= with_automatic_pagination :cards_paginated_container, page do %> + <%= with_automatic_pagination :filtered_cards_paginated_container, page do %> <%= render partial: "cards/display/preview", collection: page.records, as: :card, locals: { draggable: true }, cached: ->(card) { cacheable_preview_parts_for(card) } %> <% end %>
diff --git a/app/views/searches/_results.html.erb b/app/views/searches/_results.html.erb index 830c7ccf1..38364b547 100644 --- a/app/views/searches/_results.html.erb +++ b/app/views/searches/_results.html.erb @@ -7,14 +7,16 @@ diff --git a/app/views/searches/show.html.erb b/app/views/searches/show.html.erb index ffa9b95fd..88c1f3dc5 100644 --- a/app/views/searches/show.html.erb +++ b/app/views/searches/show.html.erb @@ -2,6 +2,6 @@ <% if @card %> <%= auto_submit_form_with url: card_path(@card), method: :get, data: { turbo_action: "advance", turbo_frame: "_top", search_redirect: true } %> <% else %> - <%= render "results", search_results: @search_results %> + <%= render "results", page: @page %> <% end %> <% end %>