In this project you will learn how to setup a basic Ruby on Rails app. The app will be a small twitter-like app with the list of users who can create new posts and comment on the existing posts. One user will have many posts, and one post can have many comments. Each comment belongs to the user and the post.
Student was able to create a functional RoR app
Optional (Student was able to use React for the front end in combination with RoR backend)
Student used MVC pattern to create three interconnected resources
Student has implemented CRUD operations
Student demonstrated the app and its functionality in a 3min video
Navigating to /login
will provide you with a simple form where you can enter
your username. No password is required. When you submit the login form a new
user should be created if no user matches the username or an exiting user should
be logged in if the username exists. Either way, you should be re-directed to
the root of the application /
. This should initialized a user session and
store the identity of the user in the session.
Navigating to /logout
should remove the user information from the session
Navigating to any page other than /login
without a user session should result
in a re-direct to /login
/
when you are logged in will show
a list of all the posts from all users in chrolological order with the most
recently created post at the top. Each post should include:
/posts/:id
described below)/posts/:id
will show the page with the information
about the post
with the given id
including
A form to add a new comment to a post. Submitting this form should show keep the browser on the same page but show the newly posted comment
From the browser, you can create a post
From the browser, you can update a post but only if you are the author
From the browser, you can delete a post but only if you are the author
From the browser, you can comment on any post
Using React is optional.
If you plan to do a React front end for your application, you may want to create an API implementation for your controller actions. See Rails API-only application guide. The main difference would be that your RoR controller actions would likely take JSON as input and return JSON as output. All or at least some of applications UI would be implemented in javascript using React rather than using Rails views.
The Ruby On Rails Tutorial
Complete 3rd edition available online