W8D6 - Friendex (cont)
Friendex
Tested and fixed Friendship Buttons
Dynamically display relevant "Add Friend", "Confirm"/"Delete Request", "Friends" button in Profile Header depending on current friendship between currentUser and currentProfile
Confirm / Delete Request - pass in "page" param to make sure the correct friend info is pulled & returned once friendship is updated (whether confirming from requestor's profile page or receiver's friends page)
Display Friend Requests only when a user is visiting their own page
Display "Remove Friend" button in FriendsIndex only when visiting own Friends page
Notes
You cannot make an :index route on a singular resource. Only the following come by default:
new
create
edit
update
show
destroy
Realized this when trying to write a route for Newsfeed - must use :show rather than :index
Make sure to specify your file types!!
Forgetting the .json.jbuilder file ending on view partials will not return anything when those views are rendered
You're going to have a bad time...














