grape
https://github.com/intridea/grape
Ruby
An opinionated framework for creating REST-like APIs in Ruby.
Grape::API#add_head_not_allowed_methods_and_options_methods
For every resource add a 'OPTIONS' route that returns an HTTP 204 response with a list of HTTP methods that can be called. Also add a route that will return an HTTP 405 response for any HTTP method that the resource cannot handle.
Edit
git clone [email protected]:intridea/grape.git
cd grape
open lib/grape/api.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Grape--API-add_head_not_allowed_methods_and_options_methods-for-pr
# Commit to gitgit add lib/grape/api.rbgit commit -m "better docs for Grape::API#add_head_not_allowed_methods_and_options_methods"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Grape--API-add_head_not_allowed_methods_and_options_methods-for-pr
hub pull-request
# Celebrate!