0
我想把我從模型中得到的每個結果放到使用twitter bootstrap的span 3中,這是我迄今爲止所做的,而不是每個垂直排列的結果都是水平堆疊的。有什麼我在這裏失蹤?把每個對象的結果放入span3 rails
<div class="container">
<div class="row">
<% @recipes.each do |r| %>
<div class="span3">
<div class="thumbnail">
<%= image_tag r.avatar.url(:myrecipes) %>
</div>
<h4><%= link_to r.dish_name, r %></h4>
<hr>
<p><%= r.description %></p>
<p><%= link_to "Edit Recipe", edit_recipe_path(r.id) %></p>
<p><%= link_to "Delete Recipe", recipe_path(r.id), :confirm => "Are you sure?", :method => :delete %></p>
<p><%= link_to "Add to favorites", {:controller => 'favourites', :action => 'create', :recipe_id => r.id}, {:method => :post } %></p>
<% end %>
</div><!--/span3-->
</div><!--/row-->
</div>
感謝您指出,這是簡單的:) – Richlewis