소스 검색

Sort results by position, #32

Ensures that candidates elected by tie-breakers are sorted in the correct order
tags/last-sinatra-version
Adrian Short 6 년 전
부모
커밋
42727516e8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      app.rb

+ 1
- 1
app.rb 파일 보기

@@ -246,7 +246,7 @@ get '/bodies/:body/elections/:date/:districts_name/:district' do
@district = District.first(:slug => params[:district])
@body = Body.first(:slug => params[:body])
@election = Election.first(:body => @body, :d => params[:date])
@candidacies = Candidacy.all(:district => @district, :election => @election, :order => [:votes.desc])
@candidacies = Candidacy.all(:district => @district, :election => @election, :order => [:position])
@total_votes = Candidacy.sum(:votes, :district => @district, :election => @election)
@total_candidates = Candidacy.count(:district => @district, :election => @election)
@total_seats = Candidacy.sum(:seats, :district => @district, :election => @election)


불러오는 중...
취소
저장