diff --git a/app/models/position.rb b/app/models/position.rb index 813eb39..9e5cf91 100644 --- a/app/models/position.rb +++ b/app/models/position.rb @@ -1,6 +1,5 @@ class Position < ApplicationRecord include PgSearch::Model - multisearchable against: [:title] belongs_to :membership diff --git a/app/services/map_group_names.rb b/app/services/map_group_names.rb index ace5297..839a857 100644 --- a/app/services/map_group_names.rb +++ b/app/services/map_group_names.rb @@ -77,8 +77,7 @@ def map_or_return_name(name) return 'Federal Independents' if name.match?(/Independent Fed/i) return 'Waringah Independents' if name.match?(/(Warringah|Waringah).+(independent|Independant)/i) return 'Lambie Network' if name.match?(/Lambie/i) - return 'United Australia Party' if name.match?(/United Australia Party/i) - + return 'United Australia Party' if name.match?(/United Australia (Party|Federal)/i) return "Pauline Hanson's One Nation" if name.match?(/Pauline Hanson|One Nation/i) # specific exceptions diff --git a/spec/services/record_group_spec.rb b/spec/services/record_group_spec.rb index 6ef44b2..9ba3011 100644 --- a/spec/services/record_group_spec.rb +++ b/spec/services/record_group_spec.rb @@ -187,16 +187,6 @@ 'Australian Conservatives (Qld)' => 'Australian Conservatives', 'Australian Conservatives (Vic)' => 'Australian Conservatives', 'Australian Conservatives ACP' => 'Australian Conservatives', - # Independents - # 'David Pocock' => 'David Pocock Campaign', - # 'David Pocock - Davi' => 'David Pocock Campaign', - # 'David Pocock Campaign' => 'David Pocock Campaign', - # 'David Pocock Pty Ltd' => 'David Pocock Campaign', - # 'David Pocock/DAVI' => 'David Pocock Campaign', - # 'Zali Steggall' => 'Zali Steggall Campaign', - # 'Zali Steggall Campaign' => 'Zali Steggall Campaign', - # 'Kim for Canberra' => 'Kim for Canberra', - # 'Helen Haines' => 'Helen Haines Campaign', # Other 'climate 200 Pty Ltd' => 'Climate 200 Pty Ltd', 'climate 200 pty ltd' => 'Climate 200 Pty Ltd', @@ -224,6 +214,8 @@ 'GetUp Ltd' => 'Get Up Limited', 'Alpha Diversification Pty Ltd' => 'Alpha Diversification Pty Ltd', 'Actus Services Pty Ltd' => 'Actus Services Pty Ltd', + 'United Australia Party' => 'United Australia Party', + 'United Australia Federal' => 'United Australia Party', } end