Skip to content

Instantly share code, notes, and snippets.

@BrianDunlap89
Created October 28, 2015 13:16
Show Gist options
  • Select an option

  • Save BrianDunlap89/9b8cfd7c97bcb03f094e to your computer and use it in GitHub Desktop.

Select an option

Save BrianDunlap89/9b8cfd7c97bcb03f094e to your computer and use it in GitHub Desktop.
Brian Dunlap -10/28 Quiz
Path Helpers
1. Run the rake routes command in the terminal
2. In the routes file, put \'as: "prefix_name"\'
3. If there are any variables in the route it prefixes, an argument will be required for each variable. Variables are represented as :symbols in the path.
Tying It Back
1. All commands are issued to the API via the terminal, whereas changes by way of the website are done through a web browser.
2. HTML: form class/action and input class/type. Rails equivalents: form_tag and submit_tag, respectively
@BrianDunlap89
Copy link
Author

  1. APIs only require a single route to perform a request, whereas websites generally require a form (aka, require an intermediary route to make a request).
  2. HTML: form and a tags, Rails: form_tag and link_to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment