X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;f=app%2Fcontrollers%2Fvideo_controller.rb;h=34678fcd7472d40dfe06c6540bb57149f53df36f;hb=de5e46c88f07fd828548ab7226cb7a0c5ebe59d5;hp=24517042a3eb84f289087f7f6e0c434b40a4cc09;hpb=2b6a0952011552367bc40f8cce3f5ff23b1f473f;p=cs356-p2-videostore.git diff --git a/app/controllers/video_controller.rb b/app/controllers/video_controller.rb index 2451704..34678fc 100644 --- a/app/controllers/video_controller.rb +++ b/app/controllers/video_controller.rb @@ -56,7 +56,7 @@ class VideoController < ApplicationController def search if request.post? @query = params[:q] - @videos = Video.find(:all, :conditions => ["title like ?", @query[0]+"%"]) + @videos = Video.find(:all, :conditions => ["title like ?", "%#{query[0]}%"]) render :action => 'searchresults' else render :action => 'search'