Permalink
Browse files

Send `source` param to track searches separately

  • Loading branch information...
1 parent 79cc168 commit a919d4eb1548dffbcf358c239aaf6feb4a71913d @raul raul committed Aug 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 init.rb
View
@@ -35,7 +35,7 @@ def docs(topic, url)
message = [
"No #{topic} article found."
]
- suggestions = json_decode(Excon.get('https://devcenter.heroku.com/articles.json', :query => { :q => topic }).body)['devcenter']
+ suggestions = json_decode(Excon.get('https://devcenter.heroku.com/articles.json', :query => { :q => topic, :source => 'heroku-docs' }).body)['devcenter']
unless suggestions.empty?
message << "Perhaps you meant one of these:"
longest = suggestions.map {|suggestion| suggestion['url'].split('/articles/').last.length }.max

0 comments on commit a919d4e

Please sign in to comment.