Merge pull request #2567 from basecamp/mobile/fix-empty-search
This commit is contained in:
@@ -2,10 +2,12 @@ class SearchesController < ApplicationController
|
||||
include Turbo::DriveHelper
|
||||
|
||||
def show
|
||||
if card = Current.user.accessible_cards.find_by_id(params[:q])
|
||||
@query = params[:q].blank? ? nil : 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
|
||||
|
||||
Reference in New Issue
Block a user