Suppose I have a User model, and I'd like to allow each user to choose their "top friends" that are also users, in order of favoriteness. This way a user can have a "best friend" and a "3rd best friend" and so on. I think what I'm looking for (correct me if this is a bad path to go down) is a habtm within the User model, with the added dimension of an order to them.
The end goal is to allow me to do something like:
@user.favorite_users
=> an ordered list of their favorite users.
@user.favorite_users.each do |user|
//iterate through each user in order from best friend to worst friend
end
I'm using Ruby 2.3.0, Rails 4.2.