0
以下函数通过投票降序(使用活动记录信誉系统link to gem)对企业(关系)进行排序。find_with_reputation的多个订单值
@businesses = Business.find_with_reputation(:votes, :all, order: "votes desc")
如何将添加次要顺序值,以便它按票,但如果票数相等它按created_at(最早在顶部)?
这纯粹是:
@businesses = Business.find_with_reputation(:votes, :all, order: "votes desc, created_at desc")
虽然我不知道“find_with_reputation”是什么,但看起来是正确的。 – Zippie