Created
November 4, 2008 22:44
-
-
Save capitalist/22239 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
# This Gist is here to explain the wonders of alias_method_chain | |
# | |
# It's also pulling double duty as an example of the gist method in training wheels. | |
# | |
# Some stuff about alias_method_chain... blah, blah blah | |
# Example: Ripped off from errtheblog | |
def render_with_benchmark(*args) | |
benchmark("Render call") do | |
render_without_benchmark(*args) | |
end | |
end | |
alias_method_chain :render, :benchmark |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment