Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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
You can’t perform that action at this time.