Created
September 5, 2011 17:32
-
-
Save ashaw/1195525 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
# 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