/sinatra-restful-crud

Creating a simple notes application with a single notes table in the database and all CRUD routes and views, using Sinatra. :diamonds:

Primary LanguageCSS

###Overview

Using Sinatra, create a simple notes application with a single notes table in the database and all CRUD routes and views. You can start from the standard SInatra Skeleton .

####Core

Demonstrate that you can implement CRUD in a Sinatra application.

####Objectives

Modify the skeleton code to achieve the following functionality:

A user Create a new note.
A user can Read all the notes created.
A user can Update a note.
A user can Delete an existing note.
Verify that a user really wants to delete a particular note.

Your note table should have a title and content field. You should use RESTful routes for each operation.

####You Will Know You Are Done When:

You can Create, Read, Update and Delete a note.
You use appropriate CRUD routes for each operation
Your can describe how the routes and views interact.

** Useful Resources:

  • Sinatra Crud Tutorial * Rendering Partials in Sinatra

####Stretch (OPTIONAL)

Add AJAX and Partials to convert your page to a single page application.

####Objectives

Redo your application so that each CRUD route is triggered from an AJAX request. When necessary, return a partial to update your display.

####You Will Know You Are Done When:

The above functionality is implemented with clean and efficient code in a single page application.