From bc612a7b8666131ceb49481494c08e07cfbd4513 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Wed, 14 Apr 2010 14:41:47 +0100 Subject: [PATCH] Minor bugfix in app.rb --- app.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.rb b/app.rb index f9272d4..ddc00d1 100644 --- a/app.rb +++ b/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