Created
August 7, 2008 21:10
-
-
Save seebq/4498 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
def cool_action | |
if request.get? | |
render :text => "You called a get, didn't you?" | |
elsif request.post? | |
render :text => "You're a poster, you big poster you." | |
elsif request.xhr? | |
render :text => "Oh, AJAX XMLHTTPrequesting. Aren't you special." | |
else | |
render :text => "Man, what is this a PUT? a DELETE? How utterly 2001!" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment