Permalink
Browse files

Merge pull request #1 from raul/master

Add `source` param to track usage separately
  • Loading branch information...
2 parents 79cc168 + a919d4e commit 9f3ad54a818e8b3b41431c805addb1e3431720c1 @geemus 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 9f3ad54

Please sign in to comment.