Skip to content

Instantly share code, notes, and snippets.

@fdutey
Created February 24, 2009 10:15
Show Gist options
  • Save fdutey/69495 to your computer and use it in GitHub Desktop.
Save fdutey/69495 to your computer and use it in GitHub Desktop.
#Je reprends l'exemple du post précédent
posts = Post.all
posts.collect{ |post| post.published? } #=> [true, true, false]
posts.collect(&:published?) #=> [true, true, false]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment