1
index.html.hamlRails可以被嵌套嵌套形式與父母形式的索引頁
我在指數page.I顯示客戶詳細信息列表中選擇所需的嵌套形式「貨地址」字段也將上市在索引頁
%tbody
- @customer_details.each do |customer|
%tr
%td= customer.customer_name
%td= customer.customer_id
%td= customer.address
%td= customer.state
%td= customer.email
- customer.goods_address.each do |goods_address|
%td= goods_address.delivery_address
%td= goods_address.name
%td= goods_address.address
%td= goods_address.state
我did.now越來越像未定義的方法錯誤'each'for# –
@HariPrakash:你可以在你的問題中更新你的關聯嗎? –
class CustomerDetail