Skip to content

Instantly share code, notes, and snippets.

@zzeni

zzeni/README.md Secret

Last active December 7, 2017 10:46
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 zzeni/eed1e046aa24a730ea542a75966dc337 to your computer and use it in GitHub Desktop.
Save zzeni/eed1e046aa24a730ea542a75966dc337 to your computer and use it in GitHub Desktop.
Prep task for the exam

A Simple Tweeting App

Task

Make a web application with Ruby on Rails that functions similarly to Tweeter

You will need to implement only two models: tweets and users

A tweet will have body column of type string, which can't be NULL.

A user will have:

  • a name column, that can't be NULL and that has a DB index (for better search performance)
  • an avatar (attached image) with sizes: 100x100 for thumbnali and 300x300 for medium size picture

You must implement authentication for the user and add appropriate restrictions.
You may try to authenticate the user with an username instead of email

On your app's website, you should be showing:

  • all the tweets at the landing page, where each tweet links to it's author (tweets/index)
  • login and signup screens
  • a users index page (users/index)
  • a user profile screen (users/show)
  • an edit user screen, which is available only for logged in user who is the owner of the profile (users/edit)
  • a new tweet screen, which is available only for logged in users (tweets/new)
  • an edit tweet screen, which is available only for logged in user who is the owner of the tweet (tweets/edit)
  • a screen with all tweets of a user (/users/5/tweets)

You should also provide a delete action for a tweet, which can be only performed by the owner of the tweet.

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