X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fcontrollers%2Fgame_controller.rb;h=39f5485d787ddfed3ca597539c4012c81168bdd7;hb=0dccca2d3c0e9d5e6eaa1c1ebee3670654fd8c43;hp=175a63fef93bce92669ab7f3145f4c954c7d93cd;hpb=c9f35305eb2750116e7a073265ea6f1081226895;p=cs356-p2-videostore.git diff --git a/app/controllers/game_controller.rb b/app/controllers/game_controller.rb index 175a63f..39f5485 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 = ?", query]) + end end