Skip to content

Instantly share code, notes, and snippets.

@davidrf
Last active August 29, 2015 14:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidrf/125aa2406c0bc3bc1149 to your computer and use it in GitHub Desktop.
Save davidrf/125aa2406c0bc3bc1149 to your computer and use it in GitHub Desktop.
Sinatra Review Exercise

Create a Sinatra app that records the places to which you have traveled. The app must meet the following requirements:

  • The app should have a places.txt file, which records the name of each place in its own line.
  • Visiting /places shows you a page listing all the places that are in the places.txt file.
  • On the same page, there is a form which takes in the name of a place. Submitting this form sends a POST request to /places.
  • Upon form submission, the name of the place is added to the places.txt file, and the page is updated to include the submitted place in the list of places.
  • Submitting a blank form does not modify the places.txt file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment