Last active
February 19, 2018 11:56
-
-
Save salami-art/fc6f0f785b0f7956c744a2f85d9ae53a 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
def contents_listing_block_for(object_list, title, &block) | |
tag.div :class => 'card' do | |
capture do | |
concat tag.header :class => 'card__header' do | |
concat title | |
end | |
concat tag.section :class => 'card__body' do | |
concat tag.ul :class => 'listing' do | |
object_list.each do |object| | |
concat link_to get_mix_content_show_url(object) do | |
concat yield object | |
end | |
end | |
end | |
end | |
concat tag.footer :class => 'card__footer' do | |
concat paginate object_list | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment