Mackenzie-Frey / brownfield-of-dreams

Brownfield of Dreams is a video tutorial platform in which additional functionality was built on an existing codebase.
https://brownfield-dreams.herokuapp.com/
1 stars 0 forks source link

User Dashboard: Friendships #12

Open mikedao opened 5 years ago

mikedao commented 5 years ago

Details: We want to create friendships between users with accounts in our database. Long term we want to make video recommendations based on what friends are bookmarking. This card should not include the recommendation logic. That's coming in a different user story.

Background: A user (Josh) exists in the system with a Github token. The user has two followers on Github. One follower (Dione) also has an account within our database. The other follower (Mike) does not have an account in our system. If a follower or following has an account in our system we want to include a link next to their name to allow us to add as a friend.

In this case Dione would have an Add as Friend link next to her name. Mike would not have the link next to his name.

Tips: No need to work on edge cases during your spike. You'll want to research self referential has_many through. Here's a good starting point to understand the concept: http://blog.hasmanythrough.com/2007/10/30/self-referential-has-many-through. You'll probably need to do more googling but that's part of the fun ;)

Mackenzie-Frey commented 5 years ago

PR is currently up for friendships patch, which includes logic to only show button if the users are not already friends.