gitlabhq/app/controllers/search_controller.rb

13 lines
292 B
Ruby
Raw Normal View History

2012-03-16 00:14:39 +01:00
class SearchController < ApplicationController
def show
query = params[:search]
if query.blank?
@projects = []
@merge_requests = []
else
@projects = Project.search(query).limit(10)
@merge_requests = MergeRequest.search(query).limit(10)
end
end
end