From 08baca0f263692f06adfaf364950576ac5298358 Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Wed, 16 Jun 2010 12:05:31 +0100 Subject: [PATCH] Fixed another DM.get error --- app.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.rb b/app.rb index c4bb540..caf1d0a 100644 --- a/app.rb +++ b/app.rb @@ -100,7 +100,7 @@ end get '/services/:slug/payments' do @service = Service.first(:slug => params[:slug]) - @payments = Payment.all(:service => @service, :amount.gte => 0, :order => [ 'd' ]) + @payments = Payment.all(:service_id => @service.id, :amount.gte => 0, :order => [ 'd' ]) @total = @payments.sum(:amount) haml :servicepayments end @@ -111,7 +111,7 @@ get '/services/:slug/paymentsdetail' do if params[:min].to_i > 0 min = params[:min].to_i end - @payments = Payment.all(:service => @service, :amount.gte => min, :order => [ 'd' ]) + @payments = Payment.all(:service_id => @service.id, :amount.gte => min, :order => [ 'd' ]) @total = @payments.sum(:amount) haml :servicepaymentsdetail, :layout => false end