gitlabhq/app/controllers/search_controller.rb
2012-03-16 01:14:39 +02:00

13 lines
292 B
Ruby

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