소스 검색

Minor bugfix in app.rb

tags/last-sinatra-version
Adrian Short 14 년 전
부모
커밋
bc612a7b86
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. +4
    -4
      app.rb

+ 4
- 4
app.rb 파일 보기

@@ -14,8 +14,8 @@ end

get '/wards/:id' do
@ward = Ward.get(params[:id])
@council_candidates = Councilcandidate.all( :ward_id => @ward.id, :order => 'surname' )
@parly_candidates = Parliamentcandidate.all( :constituency_id => @ward.constituency.id, :order => 'surname')
@council_candidates = Councilcandidate.all( :ward_id => @ward.id, :order => [ 'surname' ] )
@parly_candidates = Parliamentcandidate.all( :constituency_id => @ward.constituency.id, :order => [ 'surname' ])
haml :wards
end

@@ -25,8 +25,8 @@ get '/wards' do
@district_name = result['administrative']['district']['title']
@ward_name = result['administrative']['ward']['title']
@ward = Ward.first( { :name => @ward_name } )
@council_candidates = Councilcandidate.all( :ward_id => @ward.id, :order => 'surname')
@parly_candidates = Parliamentcandidate.all( :constituency_id => @ward.constituency.id, :order => 'surname')
@council_candidates = Councilcandidate.all( :ward_id => @ward.id, :order => [ 'surname' ])
@parly_candidates = Parliamentcandidate.all( :constituency_id => @ward.constituency.id, :order => [ 'surname' ])
haml :wards
end



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