Conversation
|
@Yuma-Nagaoka Please add a test that sorts by @flavorjones I feel like the other implementation is closer to active record, where it does a This looks good. Just want that one test to make sure it is not breaking things if args is empty. Also, not sure how the original code worked with 2 arguments for sorting |
|
Yea, ok. so my thoughts were right the
Also, it looks like it screwed up the original order as well. These 2 tests are returning
|
|
Thank you for helping us with this solution. Going with #268 instead |
Overview
fix #193
ActiveHash::Relation#findcan't return a correct record after executing#order.The reason is that the
#order_by_args!method destructively reorders the 'relation' itself, and#findis based on the 'relation's index' which has the wrong reordered index.How?
Change
#order_by_args!method to be non-destructive.