search for: sub_tot

Displaying 3 results from an estimated 3 matches for "sub_tot".

Did you mean: su_tot
2006 Jan 06
2
How do I reference eagerly loaded Models in the View?
...rder_items.each {|item| @work_order_items_table.data << Hash["Part #", item.ProductsAndServices.part_number,"Description", item.description, "Quantity",item.quantity, "Price", number_to_currency(item.price), "Extended", number_to_currency(item.sub_total)]} The above generates @work_order_items.count queries to the ProductsAndServices table. Why is that? Do I reference the eagerly loaded 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 e...
2006 Jan 05
0
Keep the Queries Down or "Referencing eagerly loaded models"
..._items.each {|item| @work_order_items_table.data << Hash["Part #", item.ProductsAndServices.part_number,"Description", item.description, "Quantity",item.quantity, "Price", number_to_currency(item.price), "Extended", number_to_currency(item.sub_total)]} The above generates @work_order_items.count queries to the ProductsAndServices table. Why is that? Do I reference the eagerly loaded data incorrectly? With the same symptom, further down in the same view I make a call to a WorkOrderItems method "pst" - this method references bot...
2006 Mar 10
5
PDF::Writer Simpletable Iteration
Hello All: I have been working with <a href="http://ruby-pdf.rubyforge.org/pdf-writer/index.html">Austin Ziegler''s PDF::Writer</a> as a means to produce PDF documents from my Rails app. I am stumped on how to iterate through a collection of items and output them in a table format. The way I have tried it so far only returns the last item in the collection -