1. Use Postgresql for your database from the beginning (not sqlite3), that way your deployment to Heroku will go much more smoothly:
Done this, also created the app in Rails 6 to give me experience of working with that release.
2. Users must sign in to see anything except the sign in page.
Here we are! Anyone can create an account above but email confirmation is active.
3. User sign-in should use the Devise gem.
Used the devise gem, added some further authentifications - created some difficulties with facebook login below
4. Users can send Friend Requests to other Users.
5. A User must accept the Friend Request to become friends.
Users can also decline requests
6. The Friend Request shows up in the notifications section of a User's navbar.
7. Users can create Posts (text only to start). 8. Users can Like Posts. 9. Users can Comment on Posts. 10. Posts should always display with the post content, author, comments and likes.
This was completed, like/unlike button done with ajax. List of likers added with links to their accounts
11. Treat the Posts Index page like the real Facebook's "Timeline" feature -- show all the recent posts from the current user and users she is friends with.
Done, mixture of users posts and all his/her friends posts mixed together. Most recent at the top.
12. Users can create a Profile with a Photo (just start by using the Gravatar image like you did in the Rails Tutorial).
Users can use Gravatar or upload their own pictures.
13. The User Show page contains their Profile information, photo, and Posts. 14. The Users Index page lists all users and buttons for sending Friend Requests to those who are not already friends or who don't already have a pending request.
15. Sign in should use Omniauth to allow a user to sign in with their real Facebook account.
This was pretty tricky but I think I have got it working - facebook has changed some of the settings regarding this.
16. Set up a mailer to send a welcome email when a new user signs up.
Set up mailer and integrated Devise so user has to confirm email, and confirm change of password by email
17. Deploy your App to Heroku.
Here we are!
18. Set up the SendGrid add-on and start sending real emails. It's free for low usage tiers.
Done - Real emails are sent in production.
1. Make posts also allow images (either just via a URL or, more complicated, by uploading one). 2. Use the Active Storage to allow users to upload a photo to their profile.
Users can do this. Upload photos with their post or for their profile picture. There are size limits, it uses Active Storage
3. Make your post able to be either a text OR a photo by using a polymorphic association (so users can still like or comment on it while being none-the-wiser).
I did this by making posts and pictures separate models so that likes and comments would have polymorphic associations with them. I think I made this more complicated then it needed to be.
4. Style it up nicely! We'll dive into HTML/CSS in the next course.
I styled it up a bit
Some of the gems used, see gemfile for full details