Created
August 20, 2008 08:47
-
-
Save dylanz/6343 to your computer and use it in GitHub Desktop.
This file contains 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
## awesomeness | |
[:get, :post, :put, :delete, :render, :request].each do |action| | |
eval %Q{ | |
def before_#{action} | |
yield | |
do_#{action} | |
end | |
alias during_#{action} before_#{action} | |
def after_#{action} | |
do_#{action} | |
yield | |
end | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment