다음 기능은 활성 레코드 평판 시스템 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