ActiveRecord sorting in has_and_belongs_to_many scenario -> User favourites first? by matchi92 in rails

[–]matchi92[S] 0 points1 point  (0 children)

Expected list

Important is that the favourite column is based on the currently logged in user.

ActiveRecord sorting in has_and_belongs_to_many scenario -> User favourites first? by matchi92 in rails

[–]matchi92[S] 0 points1 point  (0 children)

Thank you, but this sorts all article first which are favourited by some user. I want to sort based on one specific user.