grape

https://github.com/intridea/grape

Ruby

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

MergeRequest#merge_request_diff

This is the same as latest_merge_request_diff unless:
1. There are arguments - in which case we might be trying to force-reload.
2. This association is already loaded.
3. The latest diff does not exist.

The second one in particular is important - MergeRequestDiff#merge_request
is the inverse of MergeRequest#merge_request_diff, which means it may not be
the latest diff, because we could have loaded any diff from this particular
MR. If we haven't already loaded a diff, then it's fine to load the latest.

Source | Google | Stack overflow

Edit

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

cd grape

open

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-MergeRequest-merge_request_diff-for-pr


# Commit to git

git add git commit -m "better docs for MergeRequest#merge_request_diff"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-MergeRequest-merge_request_diff-for-pr

hub pull-request


# Celebrate!