X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fcontrollers%2Fvideo_controller.rb;h=31575d86e6566b54b0b3953b1c69945417131dde;hb=f4a463b2d77fccc4919aea19a54736db6e485688;hp=a5508aeb8f7e58facda15a98560449316714f7b5;hpb=3650c5f411112965a12718b75ccbedde3186fa15;p=cs356-p2-videostore.git diff --git a/app/controllers/video_controller.rb b/app/controllers/video_controller.rb index a5508ae..31575d8 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 like ?", query[0]+"%"]) + end end