Created
September 14, 2012 19:09
-
-
Save bensie/3724034 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
| # Any unmatched request within the /api/ namespace should render 404 as JSON | |
| # Stop the request here so that JSON gets returned instead of having it | |
| # run through the whole Rails stack and spit HTML. | |
| get "/*" do | |
| halt_with_404_not_found | |
| end | |
| post "/*" do | |
| halt_with_404_not_found | |
| end | |
| put "/*" do | |
| halt_with_404_not_found | |
| end | |
| patch "/*" do | |
| halt_with_404_not_found | |
| end | |
| delete "/*" do | |
| halt_with_404_not_found | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment