Преглед изворни кода

Fixed another DM.get error

pull/3/head
Adrian Short пре 14 година
родитељ
комит
08baca0f26
1 измењених фајлова са 2 додато и 2 уклоњено
  1. +2
    -2
      app.rb

+ 2
- 2
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


Loading…
Откажи
Сачувај