so basically I have this scope(sql):
scope.to_sql
=> "SELECT \"offers\".* FROM \"offers\" INNER JOIN \"cities_offers\" ON \"offers\".\"id\" = \"cities_offers\".\"offer_id\" WHERE \"cities_offers\".\"city_id\" = 2 AND \"offers\".\"category_id\" IN (2) AND (offers.category_id is NOT NULL) ORDER BY offers.discount desc LIMIT 25 OFFSET 0"
Somehow the records order is different for the above query and the same one without LIMIT and OFFSET:
scope[6]
=> #<Offer id: 8629 ...
scope.except(:offset, :limit)[6]
=> #<Offer id: 8729 ...
both 8629 and 8729 records have the same discount value ( the attribute I order by ).
Could you please advice if it's possible to keep the same records ordering under these circumstances?