app/models/user.rb
#Check if user has answered any question that is descendant of section for a specific loop_item in a specific branch
#of a looping section
Check if user has answered any question that is descendant of section for a specific loop_item in a specific branch
of a looping section
Check if user has answered any question that is descendant of section for a specific loop_item in a specific branch of a looping section
def answered_anything_here section, looping_identifier
    self.answers.find_all_by_looping_identifier(looping_identifier).each do |answer|
      if ( answer.answer_parts.any? || answer.other_text.present? ) && answer.question && section.is_ancestor_of?(answer.question)
        return true
      end
    end
    false
  end
def answered_anything_here section , looping_identifier self . answers . find_all_by_looping_identifier ( looping_identifier ) . each do | answer | if ( answer . answer_parts . any? || answer . other_text . present? ) && answer . question && section . is_ancestor_of? ( answer . question ) return true end end false end
Check if user has answered any question that is descendant of section for a specific loop_item in a specific branch
of a looping section
Check if user has answered any question that is descendant of section for a specific loop_item in a specific branch of a looping section
section
looping_identifier