Last active
March 13, 2017 13:54
-
-
Save pmaojo/fd4ca77bb4c036c7a37a399ef556aa2e to your computer and use it in GitHub Desktop.
haml loop de posts con banner cada cuatro posts
This file contains 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
- n = 0 | |
- @posts.each_with_index do |post, i| | |
%p= post.title | |
- if n < @banners.count | |
- if ((i+1) % 3 == 0) | |
%p= @banners.drop[n].first.title | |
- n += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment