projects
/
cs356-p2-videostore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Small Cleanups + Merchandise Search
[cs356-p2-videostore.git]
/
app
/
controllers
/
video_controller.rb
diff --git
a/app/controllers/video_controller.rb
b/app/controllers/video_controller.rb
index
34678fc
..
0e3d99b
100644
(file)
--- 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]
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'
render :action => 'searchresults'
else
render :action => 'search'