matthewgsommers / rails-api-cookbook-lab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

General Assembly Logo

Rails API Single Lab

Prerequisites

  • Ruby

Objectives

By the end of this lesson, students should be able to:

  • Create an API

Preparation

  1. Fork and clone this repository.
  2. Create a new branch, training, for your work.
  3. Install dependencies with bundle install
  4. Once dependencies have finished installing open your rails server in another terminal tab with rails server.

Dependencies

Rails API Lab

It's your turn now to create an API using what we learned, your notes, previous repositories, the power of the internet, and your fellow developers.

Create a Cookbook API

  • Create a full cookbook API.
  • You should have an Ingredient model, Ingredients controller, and matching routes.
  • Your Ingredient model should have name, std_measure and color columns.
  • Via migration add a column called toxicity
  • Have a serializer, that censors sensitive information from the client.
  • Make a sucessful curl request for all C.R.U.D actions.

Tips

  • Be meticulous, did you check your pluralization? is your spelling correct? Did you miss and end?
  • Test frequently, check for errors in your browser and server.
  • Follow your errors, they typically give you a line number, be patient. You should be able to identity the exact line of your bug before you ask for assistance.
  • Remember to use the generators to your advantage. They can save you valuable time.
  1. All content is licensed under a CC­BY­NC­SA 4.0 license.
  2. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.

About

License:Other


Languages

Language:Ruby 87.2%Language:HTML 9.7%Language:Shell 3.1%