Skip to content

Instantly share code, notes, and snippets.

@Joeventures
Created October 20, 2015 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Joeventures/8a694631bfde1bf37058 to your computer and use it in GitHub Desktop.
Save Joeventures/8a694631bfde1bf37058 to your computer and use it in GitHub Desktop.
1.1. The Student table has a one-to-many relationship with the Assignments table. One student to many assignments.
2.1 Four parts of a request: URL, Head, Body, and ??
Three parts of a response: Status code, Head, Body
2.2. Query string is generally used for just retrieving data -- i.e., executing a query, where the response is the result of the query. The query string can be passed in the url. For example: http://apistuff.com/doit?q=string&abc=123
Post data is generally used for sending data and receiving a response, where the response may be the updated data or a confirmation that the data was received. POST data cannot be passed in the url.
2.3. A POST request is usually the equivalent to Create, and a PATCH request is usually the equivalent to Update.
3.1 rickard.missing_hws = 2
3.2 The missing_hws instance variable.
3.3. attr_reader creates a reader method and attr_accessor creates a reader and writer method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment