Skip to content
  • Heinrich Lee Yu's avatar
    Support `#last` on relations with keyset order · ec4a0b45
    Heinrich Lee Yu authored
    When a relation has a complex order clause, ActiveRecord cannot reverse
    it automatically. But when the order clause is built using
    Gitlab::Pagination::Keyset::Order, we can determine the reverse order
    because we pass it in explicitly in these cases.
    
    This patch allows ActiveRecord to use the specified reverse order when
    calling `#last` and other related methods that need a reverse order.
    ec4a0b45