Skip to content

Commit

Permalink
Fix broken page title on Wikidata pages
Browse files Browse the repository at this point in the history
These are currently passing the entire Legislature object, which
stringifies to the JSON representation, rather than the name:

Explicitly pass the name, so we don't get that spewage.
  • Loading branch information
tmtmtmtm committed Jul 28, 2016
1 parent ff91008 commit fb45739
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def soft_redirect(url, page_title)
last_sha = @house[:sha]
popolo_file = EveryPolitician::GithubFile.new(@house[:popolo], last_sha)
@popolo = JSON.parse(popolo_file.raw, symbolize_names: true)
@page_title = "EveryPolitician: #{@country[:name]} — #{@house}"
@page_title = "EveryPolitician: #{@country[:name]} — #{@house[:name]}"
erb :wikidata_match
end

Expand Down

0 comments on commit fb45739

Please sign in to comment.