【发布时间】:2011-11-03 10:51:51
【问题描述】:
我的 js.erb 文件中有以下内容:
$('#menu').after($("<%=escape_javascript(render 'boards/customize', :board => @board, :templates => @templates, :types => @types)%>")
所以我尝试将一些本地人传递给我的部分
在我的 _customize.html.erb 中
<div id="customize">
<ul id="categories">
<% @types.each do |type|%>
<li><%=link_to type.name, change_type_board_path(board, :type_id => type.id), :remote => true %></li>
<% end %>
</ul>
<div id='carousel'>
<%=render 'boards/carousel', :templates => templates %>
</div>
</div>
I get the following error:
undefined local variable or methodboard' 代表#
你应该如何将这些变量传递给 Rails 中的局部变量?
【问题讨论】: