Permalink
Browse files

Trying to make channel search work better

  • Loading branch information...
1 parent c296de2 commit 842772322e602486a1db2628fd7a540dc34a5c7f @mutle committed Dec 27, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 app/models/channel.rb
View
@@ -47,8 +47,10 @@ def self.all_channels(_user, page)
def self.search_channels(title, page)
search :per_page => 25, :page => page, :load => true do
- title.split(' ').each do |t|
- query { string "*#{t}*" }
+ query do
+ title.split(' ').each do |t|
+ string "*#{t}*"
+ end
end
end
end

0 comments on commit 8427723

Please sign in to comment.