Add search API and update frontend

The frontend has been updated to use the new search API.
This commit is contained in:
Henrik Hansen
2010-08-29 13:58:06 +02:00
parent ed41152228
commit 49d88a0370
3 changed files with 26 additions and 18 deletions
+2 -2
View File
@@ -130,8 +130,8 @@ module Precious
get '/search' do
@query = params[:q]
@search_command = "cd #{$path} && git grep -c '#{@query}' master"
@results = `#{@search_command}`
wiki = Gollum::Wiki.new($path)
@results = wiki.search @query
mustache :search
end