Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

search is back

  • Loading branch information...
commit ff696ff44992cc8567bcf762458c921f70b749dd 1 parent 74f5dab
Arthur PETRY authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 app/controllers/albums_controller.rb
4 app/controllers/albums_controller.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.