wikiedudashboard
https://github.com/wikieducationfoundation/wikiedudashboard
Ruby
Wiki Education Foundation's Wikipedia course dashboard system
CoursesController#verify_edit_credentials
If the user could make an edit to the course, this verifies that their tokens are working. If their credentials are found to be invalid, they get logged out immediately, and this method redirects them to the home page, so that they don't make edits that fail upon save.
Edit
git clone [email protected]:wikieducationfoundation/wikiedudashboard.git
cd wikiedudashboard
open app/controllers/courses_controller.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-CoursesController-verify_edit_credentials-for-pr
# Commit to gitgit add app/controllers/courses_controller.rbgit commit -m "better docs for CoursesController#verify_edit_credentials"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-CoursesController-verify_edit_credentials-for-pr
hub pull-request
# Celebrate!