From 3a11d1e42be0f04795d169076dd1a3f7f0504c41 Mon Sep 17 00:00:00 2001 From: Karl Heitmann Date: Tue, 28 Feb 2023 21:33:11 -0300 Subject: [PATCH] Add query params to advanced_search_path if it is present --- app/views/home/index.html.erb | 2 +- app/views/searches/show.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 22134450d73..7d7b9961f70 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -9,7 +9,7 @@ <%= label_tag :home_query do %> <%= t('layouts.application.header.search_gem_html') %>
- <%= link_to t("advanced_search"), advanced_search_path, class: "home__advanced__search t-link--has-arrow"%> + <%= link_to t("advanced_search"), advanced_search_path({query: params[:query]}.compact), class: "home__advanced__search t-link--has-arrow"%>
<% end %> <%= submit_tag '⌕', :name => nil, :class => "home__search__icon" %> diff --git a/app/views/searches/show.html.erb b/app/views/searches/show.html.erb index f2ebeee0ea9..ef5eeb38e14 100644 --- a/app/views/searches/show.html.erb +++ b/app/views/searches/show.html.erb @@ -5,7 +5,7 @@

<%= @error_msg %>

<% end %> -<%= link_to t("advanced_search"), advanced_search_path, class: "t-link--gray t-link--has-arrow" %> +<%= link_to t("advanced_search"), advanced_search_path({query: params[:query]}.compact), class: "t-link--gray t-link--has-arrow" %> <% if @yanked_filter %> <% @subtitle = t('.subtitle', :query => content_tag(:em, h(params[:query]))) %>