projects
/
cs356-p2-videostore.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f95e18
)
Fix the search in the Video Controller
author
Ira W. Snyder
<devel@irasnyder.com>
Tue, 27 Nov 2007 03:44:44 +0000
(19:44 -0800)
committer
Ira W. Snyder
<devel@irasnyder.com>
Tue, 27 Nov 2007 03:44:44 +0000
(19:44 -0800)
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
app/controllers/video_controller.rb
patch
|
blob
|
history
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]
- @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'