Add searching to Video
[cs356-p2-videostore.git] / app / controllers / video_controller.rb
index a5508ae..bf283ef 100644 (file)
@@ -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