The Blog Application, usage specification

  • Blog is a contraction of "weblog", a discussion or information site published on the Web
  • There are two types of users: the Blog Administrator and Blog User.
  • The blog Administrator should be able to enter new postings, typically in reverse chronological order.
  • Users should be able to visit the blog site, and enter comments about particular postings.
  • The blog Administrator should be able to modify/remove any posting or comments.
  • Users should not be able to modify posting or other users' comments.

Initial Steps

  1. First create the rails application using:
    $ rails new blog
  2. Next, in the blog app directory, use the scaffold generator to create the MVC components needed for posts and comments
    $ rails generate scaffold post title:string body:text
    $ rails generate scaffold comment post_id:integer body:text
  3. Then, create the post and comment database tables using:
    rake db:migrate
  4. To start the web server:
    $ rails server
    point your browser to: http://localhost:3000

To get a list of all URLs currently recognized by your application:
$ rake routes

The CRUD operations on database

  • Create
  • Read
  • Update
  • Destroy

References & Resources

  • N/A