Skip to content

Commit

Permalink
Merge branch 'master' of github.com:danReynolds/SummonerExpert
Browse files Browse the repository at this point in the history
  • Loading branch information
danReynolds committed Mar 30, 2018
2 parents 63cb529 + 1b85f2d commit f29f06b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/summoners_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def load_summoner
id = RiotApi::get_summoner_id(name: name)
if id
@summoner = Summoner.find_by_summoner_id(id)
@summoner.name = name
@summoner.name = name if @summoner
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/riot_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def get_summoner_queues(args)

def get_summoner_id(args)
name = URI.encode(args[:name])
url = replace_url(@api[:summoner][:id], args)
url = replace_url(@api[:summoner][:id], args.merge(name: name))
return unless response = fetch_response(url)
response['id']
end
Expand Down

0 comments on commit f29f06b

Please sign in to comment.