Displaying 3 results from an estimated 3 matches for "work_order_items_table".
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 -
2006 Jan 06
2
How do I reference eagerly loaded Models in the View?
...s ] )
(you''ll note that I''m eagerly loading the work_order from the
work_order_item - that''s because the WorkOrderItem model references its
work_order for some processing - see "pst" below)
And in the view, I reference as such:
@work_order_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_i...
2006 Jan 05
0
Keep the Queries Down or "Referencing eagerly loaded models"
...] )
(you''ll note that I''m eagerly loading the work_order from the
work_order_item - that''s because the WorkOrderItem model references its
work_order for some processing - see "pst" below)
And in the view, I reference as such:
@work_order_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_ord...