Created
July 1, 2011 15:01
-
-
Save jonpaul/1058723 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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