Skip to content

Commit

Permalink
Merge pull request swapmyvote#765 from baob/integrate-sprintforpr-tv
Browse files Browse the repository at this point in the history
  • Loading branch information
aspiers authored Jun 1, 2024
2 parents 7d4bd0b + eda51a6 commit 9729a80
Show file tree
Hide file tree
Showing 6 changed files with 754 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/helpers/recommendations_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def recommendations_for(constituency)
def recommendations_sites
{
"stop-the-tories" => { order: 1 },
"sprint-for-pr" => { order: 2 },
"get-voting" => { order: 91 },
"peoples-vote" => { order: 92 },
"remain-united" => { order: 93 },
Expand Down
2 changes: 1 addition & 1 deletion app/models/recommendation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Recommendation < ApplicationRecord
}

def party_short_code_from_text
canonical_text_sym = text.parameterize(separator: "_").to_sym
canonical_text_sym = text.downcase.parameterize(separator: "_").to_sym
return canonical_text_sym if Party::REFERENCE_DATA.keys.include?(canonical_text_sym)
lfb_lookup = LFB_NAMES_TO_SHORT_CODE[canonical_text_sym]
return lfb_lookup unless lfb_lookup.nil?
Expand Down
Loading

0 comments on commit 9729a80

Please sign in to comment.