Skip to content

Instantly share code, notes, and snippets.

@prismicdeveloper
Created March 31, 2015 09:44
Show Gist options
  • Save prismicdeveloper/4c87bd640086b9094151 to your computer and use it in GitHub Desktop.
Save prismicdeveloper/4c87bd640086b9094151 to your computer and use it in GitHub Desktop.
group = document.get_group('article.documents')
docs = group ? group : []
docs.each do |doc|
# Desc and Link are Fragments, their type depending on what's declared in the Document Mask
desc = doc['desc']
link = doc['linktodoc']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment