From a15e13ffba42338c33f61c0e92d7fd7a1c2d56de Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 27 Oct 2020 19:48:34 -0700 Subject: [PATCH] Add map_url field to Candidate model New field on Candidate model, `map_url`, comes from the "map_app" field on the spreadsheet. @sfdoran hard-coded the links to each candidate's view on Oakland Data Portal mapping app for the current election. This is a short term fix for this election. Beyond this election, we should be composing these links. I made these changes through the GH UI. Hopefully they're great. --- models/candidate.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/candidate.rb b/models/candidate.rb index 42b7bbc8d..3d9412394 100644 --- a/models/candidate.rb +++ b/models/candidate.rb @@ -23,6 +23,7 @@ def metadata 'website_url' => self[:Website], 'facebook_url' => self[:Facebook], 'instagram_url' => self[:Instagram], + 'map_url' => self[:map_app] }.compact end @@ -39,6 +40,7 @@ def data twitter_url: self['Twitter'], facebook_url: self['Facebook'], instagram_url: self['Instagram'], + map_url: self['map_app'], votersedge_url: self['VotersEdge'], first_name: first_name, last_name: last_name,