Skip to content

Instantly share code, notes, and snippets.

@wofockham
Created March 14, 2014 03:28
Show Gist options
  • Select an option

  • Save wofockham/1000198e4ae7bed746ae to your computer and use it in GitHub Desktop.

Select an option

Save wofockham/1000198e4ae7bed746ae to your computer and use it in GitHub Desktop.

Books Database

Create a Sinatra app that allows complete CRUD control over a books and authors database.

You will need at least two classes: Book and Author

The properties/attributes you model are up to: you will need author names and book titles at the very least. You can also add images and ISBNs.

An author page will include links to all their books.

A book page will include links to all its authors.

A book may have more than one author so work out which ActiveRecord associations will best let you model this relationship.

The edit and create pages will need to allow you to associate a book and one (or more) authors.

Extensions:

Search: Allow search by title or author, including substrings: so q=Harry will return all the Harry Potter books.

Borrowers: Add a Borrower class and allow users to borrow and return books.

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