Null search
Search without a query-param should not result in a application error.
This commit is contained in:
parent
26ed59485a
commit
a088201062
1 changed files with 1 additions and 1 deletions
|
@ -211,7 +211,7 @@ EOL
|
|||
|
||||
|
||||
def search
|
||||
@query = params['query'].purify
|
||||
@query = params['query'] ? params['query'].purify : ''
|
||||
@title_results = @web.select { |page| page.name =~ /#{@query}/i }.sort
|
||||
@results = @web.select { |page| page.content =~ /#{@query}/i }.sort
|
||||
all_pages_found = (@results + @title_results).uniq
|
||||
|
|
Loading…
Reference in a new issue