From 03cf7456d7b52f1914cf9cfe42c95971f86a9ea1 Mon Sep 17 00:00:00 2001 From: Dushan Despotovic Date: Thu, 21 Jul 2022 12:02:22 +0100 Subject: [PATCH] fix lambda checks in view --- app/views/schemes/details.html.erb | 2 +- app/views/schemes/new.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/schemes/details.html.erb b/app/views/schemes/details.html.erb index f8baf47a8..4c42617f8 100644 --- a/app/views/schemes/details.html.erb +++ b/app/views/schemes/details.html.erb @@ -69,7 +69,7 @@ mantype_selection, :id, lambda { |option| - if option.id == "The same organisation that owns the housing stock" && !current_user.support? + if Scheme::ARRANGEMENT_TYPE[option.id] == "D" && !current_user.support? "Your organisation" else option.name diff --git a/app/views/schemes/new.html.erb b/app/views/schemes/new.html.erb index e4f598002..4d3e20cd4 100644 --- a/app/views/schemes/new.html.erb +++ b/app/views/schemes/new.html.erb @@ -71,7 +71,7 @@ mantype_selection, :id, lambda { |option| - if option.id == "The same organisation that owns the housing stock" && !current_user.support? + if Scheme::ARRANGEMENT_TYPE[option.id] == "D" && !current_user.support? "Your organisation" else option.name