Skip to content

Instantly share code, notes, and snippets.

@norcali
Created May 22, 2013 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save norcali/5629719 to your computer and use it in GitHub Desktop.
Save norcali/5629719 to your computer and use it in GitHub Desktop.
color = 0
j = 1
Sites.all.each do |site|
2.times do
i = 0
post = site.posts.reverse[i]
if nada
blanco
elsif color.modulo(2) == 0
rojo
else verde
end
j += 1
if j == 2
color += 1
j = 0
end
i += 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment