Skip to content

Instantly share code, notes, and snippets.

@ashaw
Created September 5, 2011 17:32
Show Gist options
  • Save ashaw/1195525 to your computer and use it in GitHub Desktop.
Save ashaw/1195525 to your computer and use it in GitHub Desktop.
# the ruby way
def slot_tag(name, &blk)
slot_article = Slot.find_by_name(name).article
blk.call slot_article
end
# the yehuda katz way
def slot_tag(name, &blk)
slot_article = Slot.find_by_name(name).article
capture slot_article, &blk
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment