X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fcontrollers%2Fvideo_controller.rb;h=bf283efcad788bd395bc787c64093680e38a56dc;hb=3947513155ffed3b49a2cd0e80cd3ef26b551f59;hp=a5508aeb8f7e58facda15a98560449316714f7b5;hpb=6223af90077b9722e4d8add790a407f2cbcb6962;p=cs356-p2-videostore.git diff --git a/app/controllers/video_controller.rb b/app/controllers/video_controller.rb index a5508ae..bf283ef 100644 --- a/app/controllers/video_controller.rb +++ b/app/controllers/video_controller.rb @@ -48,4 +48,13 @@ class VideoController < ApplicationController Video.find(params[:id]).destroy redirect_to :action => 'list' end + + def searchbyname + render :action => 'searchbyname' + end + + def searchresults + query = params[:q] + @videos = Video.find(:all, :conditions => ["title = ?", query]) + end end