【发布时间】:2016-09-30 18:54:09
【问题描述】:
我想为每个报价呈现一个部分。 我有以下代码:
提供/index.html.haml:
- @offers.each do |o|
= render 'offershort', locals: {offer: o}
offers/_offershort.html.haml:
= link_to offer.name, offer_path
= offer.description
我收到一个错误:
未定义的局部变量或方法`offer'
如何正确操作?
【问题讨论】:
标签: ruby-on-rails