grape

https://github.com/intridea/grape

Ruby

An opinionated framework for creating REST-like APIs in Ruby.

Grape::API#cascade?

Some requests may return a HTTP 404 error if grape cannot find a matching
route. In this case, Grape::Router adds a X-Cascade header to the response
and sets it to 'pass', indicating to grape's parents they should keep
looking for a matching route on other resources.

In some applications (e.g. mounting grape on rails), one might need to trap
errors from reaching upstream. This is effectivelly done by unsetting
X-Cascade. Default :cascade is true.

Source | Google | Stack overflow

Edit

git clone [email protected]:intridea/grape.git

cd grape

open lib/grape/api.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Grape--API-cascade--for-pr


# Commit to git

git add lib/grape/api.rbgit commit -m "better docs for Grape::API#cascade?"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Grape--API-cascade--for-pr

hub pull-request


# Celebrate!