Permalink
Browse files

Mod: 修正上次提交修正Ruby那个没有转换小写的问题

  • Loading branch information...
1 parent 00289e6 commit 37677ace7bf8e82a7060e929ddfe2d8ad8d9bffa @huacnlee committed Apr 2, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/ask.rb
View
@@ -111,7 +111,7 @@ def self.search_title(text,options = {})
words = []
result.raw_result[:words].each do |w|
next if w[0] == "ask"
- words << ((w[0] == "rubi" and text.index("ruby")) ? "ruby" : w[0])
+ words << ((w[0] == "rubi" and text.downcase.index("ruby")) ? "ruby" : w[0])
end
out_result = {:items => [], :words => words}
out_result[:items] = Ask.all_in(:title => words.collect { |w| /#{w}/i }).recent.normal.limit(limit)

0 comments on commit 37677ac

Please sign in to comment.