Skip to content

Commit

Permalink
Fix guard in searches controller (#538)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliciapaz authored Mar 26, 2024
1 parent ae1f106 commit 1e867d2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/controllers/searches_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ class SearchesController < ApplicationController
skip_before_action :authenticate_user!

def show
unless request.referrer&.include? search_url
@search = Search.new
render "_preview"
end
render "_preview" and return if params["search"].blank?

set_search_pills_data
@search = params["search"].present? ? Search.new(create_params) : Search.new
Expand Down

0 comments on commit 1e867d2

Please sign in to comment.