From: Ira W. Snyder Date: Tue, 27 Nov 2007 03:44:44 +0000 (-0800) Subject: Fix the search in the Video Controller X-Git-Tag: turned-in~9 X-Git-Url: https://irasnyder.com/gitweb/?a=commitdiff_plain;h=a3f2e1acd3fe12d745866245ae4dae66d6fcd8d0;hp=7f95e18dac6aa7aad71099526bbd104481516c7a;p=cs356-p2-videostore.git Fix the search in the Video Controller Signed-off-by: Ira W. Snyder --- diff --git a/app/controllers/video_controller.rb b/app/controllers/video_controller.rb index 34678fc..0e3d99b 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'