Commit 3f31c2a13c31f9e1bc02f853f5baf1eec2091abc
1 parent
b8aabb0d
Exists in
master
and in
29 other branches
ActionItem85: search
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@762 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/controllers/public/search_controller.rb
1 | class SearchController < ApplicationController | 1 | class SearchController < ApplicationController |
2 | def index | 2 | def index |
3 | - @query = params[:query] | 3 | + @query = params[:query] || '' |
4 | @results = Article.find_tagged_with(@query) + Article.find_by_contents(@query) | 4 | @results = Article.find_tagged_with(@query) + Article.find_by_contents(@query) |
5 | end | 5 | end |
6 | end | 6 | end |