Submit social housing lettings and sales data (CORE)
 
 
 
 

11 lines
370 B

module ConditionalQuestionsHelper
def conditional_questions_for_page(page)
page["questions"].values.map { |question|
question["conditional_for"]
}.compact.map(&:keys).flatten
end
def display_question_key_div(page_info, question_key)
"style='display:none;'".html_safe if conditional_questions_for_page(page_info).include?(question_key)
end
end