Displaying 1 result from an estimated 1 matches for "some_ord".
Did you mean:
someword
2006 Mar 13
0
(Nested) collection in a view
Say I have a model consisting of Order( has_many :order_lines) and OrderLine(
belongs_to :order).
What would be the ''rails way'' to create an order form?
Know I could just say @order = Order.some_order, @lines =
@order.order_lines, and use something like this..:
order.rhtml:
Order no: <%= @order.no %>
Date <%= date_select "order", "date" %>
<hr />
<% for line in @lines %> # or use a partial..
...
Amount: <%= text_field "lines[]", &q...