X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fcontrollers%2Fgame_controller.rb;h=42a037e0a5a1feb6773c6114cf2145d4b6a10f7d;hb=9b264f25255cc0e7cca3169d99905f590c8be578;hp=175a63fef93bce92669ab7f3145f4c954c7d93cd;hpb=3650c5f411112965a12718b75ccbedde3186fa15;p=cs356-p2-videostore.git diff --git a/app/controllers/game_controller.rb b/app/controllers/game_controller.rb index 175a63f..42a037e 100644 --- a/app/controllers/game_controller.rb +++ b/app/controllers/game_controller.rb @@ -48,4 +48,13 @@ class GameController < ApplicationController Game.find(params[:id]).destroy redirect_to :action => 'list' end + + def searchbyname + render :action => 'searchbyname' + end + + def searchresults + query = params[:q] + @games = Game.find(:all, :conditions => ["title like ?", query[0]+"%"]) + end end