I’m sorting a separate list that doesn’t contain a certain user’s
attribute, but trying to but that certain user’s attribute on the
separate percentile.
It finds index_one correctly, but index_two always equals index_one,
even if there are more than one object with a score of my_testscore.
ActiveRecord object compare base on their primary key so this is the
expected behaviour.
sorted_ts.rindex {|test_score| test_score.score == my_ts.score} might
be what you want.
It finds index_one correctly, but index_two always equals index_one,
even if there are more than one object with a score of my_testscore.
ActiveRecord object compare base on their primary key so this is the
expected behaviour.
sorted_ts.rindex {|test_score| test_score.score == my_ts.score} might
be what you want.