Browse files

search is back

  • Loading branch information...
1 parent 74f5dab commit ff696ff44992cc8567bcf762458c921f70b749dd Arthur PETRY committed May 18, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −3 app/controllers/albums_controller.rb
View
4 app/controllers/albums_controller.rb
@@ -5,9 +5,7 @@ def index
if q = params[:q]
# conditions = {:artist => /#{q}/i, :name => /#{q}/i}
# see http://www.mongodb.org/display/DOCS/OR+operations+in+query+expressions
- # this can shutdown the server !
- # conditions = { "$where" => "this.name.match(/#{q}/i) || this.artist.match(/#{q}/i)" }
- conditions = nil # disabled for now.
+ conditions = { "$where" => "this.name.match(/#{q}/i) || this.artist.match(/#{q}/i)" }
end
if params[:randomly]
@albums = Album.find_randomly

0 comments on commit ff696ff

Please sign in to comment.