我正在尝试渲染这个,我在浏览器中返回的唯一内容是:[]
<div>
<% @team.player.each do |p| %>
<%= render :template=>"images/carousel", :locals => { :images => p.images, :id=> "p-images-" + p.id.to_s } %>
<% end %>
</div>
这是我的轮播
的模板<div id="<%= id %>" class="carousel slide">
<div class="carousel-inner">
<% images.each_with_index do |i, index| %>
<div class="item thumbnail<% if index == 0 %> active<% end %>">
<img class="img-rounded" src="<%= i.image.url %>" />
</div>
<% end %>
</div>
<a class="carousel-control left" href="#<%= id %>" data-slide="prev">‹</a>
<a class="carousel-control right" href="#<%= id %>" data-slide="next">›</a>
<ol class="carousel-indicators">
<% images.each_with_index do |i, index| %>
<li data-target="#<%= id %>" data-slide-to="<%= index %>"<% if index == 0 %> class="active"<% end %>></li>
<% end %>
</ol>
</div>