Skip to content

Instantly share code, notes, and snippets.

@jonpaul
Created July 1, 2011 15:01
Show Gist options
  • Save jonpaul/1058723 to your computer and use it in GitHub Desktop.
Save jonpaul/1058723 to your computer and use it in GitHub Desktop.
#contentButton{ :class => cycle_with_last(blurb, @content, options = {:one => 'first ', :two => 'second ', :three => 'third ', :last => 'last '}) + blurb.id.to_s }
= image_tag('ancillary/ribbon_top.png', :class => 'ribbonTop')
= image_tag('ancillary/ribbon_bottom.png', :class => 'ribbonBot')
= image_tag blurb.image.url, :class => "blurbImage" unless blurb.image.blank?
%p.heading= blurb.name
%p.shortContent= blurb.short_content.presence || nil
.contents= blurb.content
= add_row_on_last(blurb, @content)
def add_row_on_last(object, collection)
if object == collection.last
haml_tag 'div.contentRow'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment