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.