openfoodnetwork
https://github.com/openfoodfoundation/openfoodnetwork
Ruby
Connect suppliers, distributors and consumers to trade local produce.
ApplicationController#with_format
All render calls within the block will be performed with the specified format Useful for rendering html within a JSON response, particularly if the specified template or partial then goes on to render further partials without specifying their format.
Edit
git clone [email protected]:openfoodfoundation/openfoodnetwork.git
cd openfoodnetwork
open app/controllers/application_controller.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-ApplicationController-with_format-for-pr
# Commit to gitgit add app/controllers/application_controller.rbgit commit -m "better docs for ApplicationController#with_format"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-ApplicationController-with_format-for-pr
hub pull-request
# Celebrate!