Skip to content

Instantly share code, notes, and snippets.

@kareemgrant
Last active August 29, 2015 14:23
Show Gist options
  • Save kareemgrant/a61476d8335a649b1476 to your computer and use it in GitHub Desktop.
Save kareemgrant/a61476d8335a649b1476 to your computer and use it in GitHub Desktop.
Rails CRUD Operations
## Rails CRUD Operations
### Goals
1. Implement all the basic CRUD Operations (7 actions) for a Rails resource
### Assignment
***This homework assignment requires that you build upon your existing blog app (from the prior homework assignment)***
In the last homework assignment you were tasked with implementing both an index and show action for the posts resource. During this assignment you will do the following:
1. Add an Authors model to your blog application. An author should have first_name and last_name.
2. Add an index view that lists all authors
3. Add the abilty to view the details of a specific author.
4. Add the ability to create new authors. The user should be rediected to the index page and be presented with a confirmation flash message after an author is successfully deleted.
5. Add the ability to update an existing author. The user should be redirected back to the show page of the recently updated author and be presented with a confirmation flash message confirming the author was successfully updated.
6. Add the ability to delete an existing author. The user should be redirected back to the index view and presented with a confirmation message confirming that the author has been deleted.
7. Use links and buttons (where appropriate) to allow users to navigate to specific pages without having to type a url into the address bar.
8. When you're done, commit your project to a new Git repo and push it to GitHub. Submit the link on Canvas.
### Recommended Activity
Read the rest of the Rails guide on routing:
[http://guides.rubyonrails.org/routing.html](http://guides.rubyonrails.org/routing.html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment