How to Create A Friendship Relation on Rails

Written by Kubilay | Published 2020/06/26
Tech Story Tags: ruby-on-rails | web-development | databases | friendship | associations | ruby | software-development | coding

TLDR In this article, you will learn how to create friendships on the most basic form on rails. In this project we are choosing this model: Users are allowed to send a friendship invitation to other users. Users can accept or reject the invitation that is coming from another user. The invitation model will have only three columns: user_id, friend_id and confirmed. This means A user object will respond to the “invitations” call. On every users’ page, we have a “friends’ list” method of course. This will return an array of “Friends’s first friends”.via the TL;DR App

no story

Written by Kubilay | Full Stack
Published by HackerNoon on 2020/06/26