@nertc commented on this pull request.


> +  has_many :follows, -> { joins(:following).where(:users => { :status => 
> %w[active confirmed] }) }
+  has_many :followings, :through => :follows, :source => :following

> Maybe use "Following" instead of "Followed users" for better clarity. It 
> aligns with the common terminology users are familiar with, like "Following" 
> and "Followers," which may feel more intuitive. Just a thought.

As mentioned in previous comments 
(https://github.com/openstreetmap/openstreetmap-website/pull/5261#discussion_r1803345542)
 common terminology is to use `followers` (user who follows) and `followings` 
(user who is followed). Therefore, I used `:followings`.

About `:follows`, it was change for `:friendships`. Another version I thought 
about was to name it `:followerships` but it needed additional `:class_name => 
` attributes to work and for that, I chose to have standard `:follows` (as 
produced from the model's name `Follow`)


-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5261#discussion_r1910436072
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/5261/review/2542553...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to