summaryrefslogtreecommitdiff
path: root/app/controllers/search_controller.rb
blob: 51aee9e1b5471e49ad3f351ca8c9de4a301e99b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class SearchController < ApplicationController

	def go
		@query = params[:query]

		if (@query.nil?) then 
			return 
		end

		@tournaments = Tournament.where("name LIKE '%#{@query}%'")
		@players = User.where("name LIKE '%#{@query}%'")

	end

end