app/controllers/concerns/completion_step.rb
def purge_incomplete_checks
    current_disclosure_report.disclosure_checks.in_progress.destroy_all

    # It could happen the current session was one of the purged
    # incomplete checks, so this ensures we have a valid one again.
    swap_disclosure_check_session(
      current_disclosure_report.disclosure_checks.last.id
    )
  end
# remove any incomplete checks as they don't serve any purpose now
remove any incomplete checks as they don't serve any purpose now
remove any incomplete checks as they don ' t serve any purpose now
def purge_incomplete_checks
    current_disclosure_report.disclosure_checks.in_progress.destroy_all
    swap_disclosure_check_session(
      current_disclosure_report.disclosure_checks.last.id
    )
  end
def purge_incomplete_checks current_disclosure_report . disclosure_checks . in_progress . destroy_all swap_disclosure_check_session ( current_disclosure_report . disclosure_checks . last . id ) end
remove any incomplete checks as they don't serve any purpose now
remove any incomplete checks as they don ' t serve any purpose now
# It could happen the current session was one of the purged # incomplete checks, so this ensures we have a valid one again.