Browse Source

Backfill ethnic questions

pull/1254/head
Kat 3 years ago
parent
commit
707f6925db
  1. 2
      app/models/form/lettings/pages/lead_tenant_ethnic_background_arab.rb
  2. 2
      app/models/form/lettings/pages/lead_tenant_ethnic_background_asian.rb
  3. 2
      app/models/form/lettings/pages/lead_tenant_ethnic_background_black.rb
  4. 2
      app/models/form/lettings/pages/lead_tenant_ethnic_background_mixed.rb
  5. 2
      app/models/form/lettings/pages/lead_tenant_ethnic_background_white.rb
  6. 21
      app/models/form/lettings/questions/ethnic_arab.rb
  7. 30
      app/models/form/lettings/questions/ethnic_asian.rb
  8. 24
      app/models/form/lettings/questions/ethnic_black.rb
  9. 27
      app/models/form/lettings/questions/ethnic_mixed.rb
  10. 9
      app/models/form/lettings/questions/ethnic_white.rb

2
app/models/form/lettings/pages/lead_tenant_ethnic_background_arab.rb

@ -8,6 +8,6 @@ class Form::Lettings::Pages::LeadTenantEthnicBackgroundArab < ::Form::Page
end
def questions
@questions ||= [Form::Lettings::Questions::Ethnic.new(nil, nil, self)]
@questions ||= [Form::Lettings::Questions::EthnicArab.new(nil, nil, self)]
end
end

2
app/models/form/lettings/pages/lead_tenant_ethnic_background_asian.rb

@ -8,6 +8,6 @@ class Form::Lettings::Pages::LeadTenantEthnicBackgroundAsian < ::Form::Page
end
def questions
@questions ||= [Form::Lettings::Questions::Ethnic.new(nil, nil, self)]
@questions ||= [Form::Lettings::Questions::EthnicAsian.new(nil, nil, self)]
end
end

2
app/models/form/lettings/pages/lead_tenant_ethnic_background_black.rb

@ -8,6 +8,6 @@ class Form::Lettings::Pages::LeadTenantEthnicBackgroundBlack < ::Form::Page
end
def questions
@questions ||= [Form::Lettings::Questions::Ethnic.new(nil, nil, self)]
@questions ||= [Form::Lettings::Questions::EthnicBlack.new(nil, nil, self)]
end
end

2
app/models/form/lettings/pages/lead_tenant_ethnic_background_mixed.rb

@ -8,6 +8,6 @@ class Form::Lettings::Pages::LeadTenantEthnicBackgroundMixed < ::Form::Page
end
def questions
@questions ||= [Form::Lettings::Questions::Ethnic.new(nil, nil, self)]
@questions ||= [Form::Lettings::Questions::EthnicMixed.new(nil, nil, self)]
end
end

2
app/models/form/lettings/pages/lead_tenant_ethnic_background_white.rb

@ -8,6 +8,6 @@ class Form::Lettings::Pages::LeadTenantEthnicBackgroundWhite < ::Form::Page
end
def questions
@questions ||= [Form::Lettings::Questions::Ethnic.new(nil, nil, self)]
@questions ||= [Form::Lettings::Questions::EthnicWhite.new(nil, nil, self)]
end
end

21
app/models/form/lettings/questions/ethnic_arab.rb

@ -0,0 +1,21 @@
class Form::Lettings::Questions::EthnicArab < ::Form::Question
def initialize(id, hsh, page)
super
@id = "ethnic"
@check_answer_label = "Lead tenant’s ethnic background"
@header = "Which of the following best describes the lead tenant’s Arab background?"
@type = "radio"
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
end
ANSWER_OPTIONS = {
"19" => {
"value" => "Arab",
},
"16" => {
"value" => "Other ethnic group",
},
}.freeze
end

30
app/models/form/lettings/questions/ethnic_asian.rb

@ -0,0 +1,30 @@
class Form::Lettings::Questions::EthnicAsian < ::Form::Question
def initialize(id, hsh, page)
super
@id = "ethnic"
@check_answer_label = "Lead tenant’s ethnic background"
@header = "Which of the following best describes the lead tenant’s Asian or Asian British background?"
@type = "radio"
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
end
ANSWER_OPTIONS = {
"10" => {
"value" => "Bangladeshi",
},
"15" => {
"value" => "Chinese",
},
"8" => {
"value" => "Indian",
},
"9" => {
"value" => "Pakistani",
},
"11" => {
"value" => "Any other Asian or Asian British background",
},
}.freeze
end

24
app/models/form/lettings/questions/ethnic_black.rb

@ -0,0 +1,24 @@
class Form::Lettings::Questions::EthnicBlack < ::Form::Question
def initialize(id, hsh, page)
super
@id = "ethnic"
@check_answer_label = "Lead tenant’s ethnic background"
@header = "Which of the following best describes the lead tenant’s Black, African, Caribbean or Black British background?"
@type = "radio"
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
end
ANSWER_OPTIONS = {
"13" => {
"value" => "African",
},
"12" => {
"value" => "Caribbean",
},
"14" => {
"value" => "Any other Black, African or Caribbean background",
},
}.freeze
end

27
app/models/form/lettings/questions/ethnic_mixed.rb

@ -0,0 +1,27 @@
class Form::Lettings::Questions::EthnicMixed < ::Form::Question
def initialize(id, hsh, page)
super
@id = "ethnic"
@check_answer_label = "Lead tenant’s ethnic background"
@header = "Which of the following best describes the lead tenant’s Mixed or Multiple ethnic groups background?"
@type = "radio"
@check_answers_card_number = 1
@hint_text = "The lead tenant is the person in the household who does the most paid work. If several people do the same paid work, the lead tenant is whoever is the oldest."
@answer_options = ANSWER_OPTIONS
end
ANSWER_OPTIONS = {
"4" => {
"value" => "White and Black Caribbean",
},
"5" => {
"value" => "White and Black African",
},
"6" => {
"value" => "White and Asian",
},
"7" => {
"value" => "Any other Mixed or Multiple ethnic background",
},
}.freeze
end

9
app/models/form/lettings/questions/ethnic.rb → app/models/form/lettings/questions/ethnic_white.rb

@ -1,4 +1,4 @@
class Form::Lettings::Questions::Ethnic < ::Form::Question
class Form::Lettings::Questions::EthnicWhite < ::Form::Question
def initialize(id, hsh, page)
super
@id = "ethnic"
@ -10,5 +10,10 @@ class Form::Lettings::Questions::Ethnic < ::Form::Question
@answer_options = ANSWER_OPTIONS
end
ANSWER_OPTIONS = { "1" => { "value" => "English, Welsh, Northern Irish, Scottish or British" }, "2" => { "value" => "Irish" }, "18" => { "value" => "Gypsy or Irish Traveller" }, "3" => { "value" => "Any other White background" } }.freeze
ANSWER_OPTIONS = {
"1" => { "value" => "English, Welsh, Northern Irish, Scottish or British" },
"2" => { "value" => "Irish" },
"18" => { "value" => "Gypsy or Irish Traveller" },
"3" => { "value" => "Any other White background" },
}.freeze
end
Loading…
Cancel
Save