{% if courses.enrolled and courses.enrolled.any? %} {%- assign all_categories = "" -%} {%- for category in categories.enrolled -%} {% comment %}