summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/search_controller.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb
index ee61487..9da649d 100644
--- a/app/controllers/search_controller.rb
+++ b/app/controllers/search_controller.rb
@@ -1,2 +1,13 @@
class SearchController < ApplicationController
+
+ def go
+ @query = params[:query]
+
+ if (@query.nil?) return;
+
+ @tournaments = Tournament.where("name LIKE '#{@query}'")
+ @players = User.where("name LIKE '#{@query}")
+
+ end
+
end