Displaying 2 results from an estimated 2 matches for "charge_pst".
2006 Jan 06
2
How do I reference eagerly loaded Models in the View?
...d data incorrectly?
With the same symptom, further down in the same view I make a call to a
WorkOrderItems method "pst" - this method references both eagerly
referenced models - WorkOrders and ProductsAndServices using the syntax:
#calculate the line item pst
def pst
if (self.WorkOrder.charge_pst? and
self.ProductsAndServices.charge_pst?)
sub_total * 0.07
else
0.0
end
end
Again, I see that database queries are made to retrieve both WorkOrder
and ProductsAndServices.
Probably the same problem on my part. Any ideas ninjas?
Thanx for any help.
Jodi
--
Posted via http://...
2006 Jan 05
0
Keep the Queries Down or "Referencing eagerly loaded models"
...data incorrectly?
With the same symptom, further down in the same view I make a call to a
WorkOrderItems method "pst" - this method references both eagerly
referenced models - WorkOrders and ProductsAndServices using the syntax:
#calculate the line item pst
def pst
if (self.WorkOrder.charge_pst? and
self.ProductsAndServices.charge_pst?)
sub_total * 0.07
else
0.0
end
end
Again, I see that database queries are made to retrieve both WorkOrder
and ProductsAndServices.
Probably the same problem on my part. Any ideas ninjas?
Thanx for any help.
Jodi
--
Posted via http:/...