openstreetmap-website
https://github.com/openstreetmap/openstreetmap-website
Ruby
The Rails application that powers OpenStreetMap
ApplicationController#require_capability
requires the user to be logged in by the token or HTTP methods, or have an OAuth token with the right capability. this method is a bit of a pain to call directly, since it's cumbersome to call filters with arguments in rails. to make it easier to read and write the code, there are some utility methods below.
Edit
git clone [email protected]:openstreetmap/openstreetmap-website.git
cd openstreetmap-website
open app/controllers/application_controller.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-ApplicationController-require_capability-for-pr
# Commit to gitgit add app/controllers/application_controller.rbgit commit -m "better docs for ApplicationController#require_capability"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-ApplicationController-require_capability-for-pr
hub pull-request
# Celebrate!