Class: Workarea::Search::StorefrontSearch::Template

Inherits:
Object
  • Object
show all
Includes:
Middleware
Defined in:
app/queries/workarea/search/storefront_search/template.rb

Instance Method Summary collapse

Methods included from Middleware

#initialize

Instance Method Details

#call(response) ⇒ Object



7
8
9
10
11
12
13
# File 'app/queries/workarea/search/storefront_search/template.rb', line 7

def call(response)
  if response.total > 0 || response.has_filters?
    yield
  else
    response.template = 'no_results'
  end
end