diff --git a/app/assets/stylesheets/search.css b/app/assets/stylesheets/search.css index 32dec66b3..5691ac5e5 100644 --- a/app/assets/stylesheets/search.css +++ b/app/assets/stylesheets/search.css @@ -129,9 +129,4 @@ summary { padding-inline: 0; } } - .search-perma--empty { - .search { - display: none; - } - } } diff --git a/app/controllers/searches_controller.rb b/app/controllers/searches_controller.rb index e968edbc3..b849f04f1 100644 --- a/app/controllers/searches_controller.rb +++ b/app/controllers/searches_controller.rb @@ -3,10 +3,10 @@ class SearchesController < ApplicationController def show @query = params[:q].blank? ? nil : params[:q] - if card = Current.user.accessible_cards.find_by_id(params[:q]) + if card = Current.user.accessible_cards.find_by_id(@query) @card = card else - set_page_and_extract_portion_from Current.user.search(params[:q]) + set_page_and_extract_portion_from Current.user.search(@query) @recent_search_queries = Current.user.search_queries.order(updated_at: :desc).limit(10) end end diff --git a/app/views/searches/_results.html.erb b/app/views/searches/_results.html.erb index 0b622e95d..573d20397 100644 --- a/app/views/searches/_results.html.erb +++ b/app/views/searches/_results.html.erb @@ -1,6 +1,6 @@