|
|
@ -57,8 +57,12 @@ class FormHandler |
|
|
|
forms["current_lettings"] = Form.new(nil, current_collection_start_year, LETTINGS_SECTIONS, "lettings") if forms["current_lettings"].blank? |
|
|
|
forms["current_lettings"] = Form.new(nil, current_collection_start_year, LETTINGS_SECTIONS, "lettings") if forms["current_lettings"].blank? |
|
|
|
forms["next_lettings"] = Form.new(nil, next_collection_start_year, LETTINGS_SECTIONS, "lettings") if forms["next_lettings"].blank? |
|
|
|
forms["next_lettings"] = Form.new(nil, next_collection_start_year, LETTINGS_SECTIONS, "lettings") if forms["next_lettings"].blank? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if Rails.env.test? |
|
|
|
|
|
|
|
forms.merge({ fake_lettings_2021: Form.new("spec/fixtures/forms/2021_2022.json"), real_lettings_2021: Form.new("config/forms/2021_2022.json") }) |
|
|
|
|
|
|
|
else |
|
|
|
forms |
|
|
|
forms |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def lettings_form_for_start_year(year) |
|
|
|
def lettings_form_for_start_year(year) |
|
|
|
lettings_forms.values.find { |form| form.start_date.year == year } |
|
|
|
lettings_forms.values.find { |form| form.start_date.year == year } |
|
|
|