Skip to content

Instantly share code, notes, and snippets.

@kareemgrant
Last active August 29, 2015 14:19
Show Gist options
  • Save kareemgrant/f3f6607d2013ca699ce9 to your computer and use it in GitHub Desktop.
Save kareemgrant/f3f6607d2013ca699ce9 to your computer and use it in GitHub Desktop.

Rails Models & Controllers

Goals

  1. Understand RESTful routing and how to create the routing necessary for an arbitrary resource in Rails

Assignment

This homework assignment requires that you build upon your existing blog app (from the prior homework assignment)

  1. Add the ability to delete Posts from the index view for Posts. The user should be rediected to the index page and be presented with a confirmation flash message after a post is successfully deleted.

  2. Add the ability to create Posts. The user should be redirected to the show page of the newly created post and be presented with a confirmation flash message confirming that post was successfully created.

  3. 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

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