Skip to content

Instantly share code, notes, and snippets.

@sime
Last active December 30, 2015 22:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sime/7891953 to your computer and use it in GitHub Desktop.
Save sime/7891953 to your computer and use it in GitHub Desktop.
A Rails app to get your hands dirty quickly

Message board

A message board application where people can contribute to various topics.

At each step, the application must be deployed on Heroku

Create a message (thread).

Anyone can post a message. A new message requires the following fields

  • subject
  • message
  • author

No field can be left empty.

Hints: Scaffolding and validation.

Comment on a message

Anyone can comment on a message. To place a comment the following fields are required

  • comment
  • author

Question: What is the relationship between a message and comment.

Hint: Active Record Associations

Pretty URLs

Each time a new thread is created, the URL must be pretty:

If I create a new thread with the subject of 'World Wide Web' I expect the URL to look like:

/messages/world-wide-web

The subject has being slugged. The slug should be stored in the same row as the message itself.

Ensure that if I create another message with same subject, a different slug is create.

Hint: Unique validation rule

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