Skip to content

Instantly share code, notes, and snippets.

@stantona
Created September 20, 2012 17:26
Show Gist options
  • Save stantona/3757207 to your computer and use it in GitHub Desktop.
Save stantona/3757207 to your computer and use it in GitHub Desktop.
check for cover image
%header{class: topic.cover_image? ? 'coverimage' : ''}
-if topic.cover_image?
%figure.img-canvas-small
=image_tag(comment.topic.cover_image)
-# I want this execute seperately, but nested in header
%article
%h2
-if comment.conversation.subject?
%a.title{ href: conversation_path(comment.conversation, anchor: comment.id.to_s), 'data-pjax' => '#container' }
=comment.conversation.subject
-else
%a.title{ href: conversation_path(comment.conversation, anchor: comment.id.to_s), 'data-pjax' => '#container' }
=comment.topic.title
-# end nesting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment