search for: total_line_item

Displaying 1 result from an estimated 1 matches for "total_line_item".

Did you mean: total_line_items
2006 Oct 13
3
How to get a count of line_items
..._items as an example. An order has_many line_items A line_item belongs to order In my OrdersController I have def summary @orders = Orders.find(:all) render :xml => @orders.to_xml() end What I want to achieve is to include a count of line_items per order, and to include it as say total_line_items in the output. I don''t know how to a.) get the count per order, b.) how to include in the output. Thanks Andrew -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups...