Reputation: 126
View
<div class="row">
<% @firstbox.each do |first| %>
<div class="col-md-6">
Big Box <%= first.title %>
</div>
<% end %>
<div class="col-md-6">
<div class="row">
<% @firstbox.each do |second| %>
<div class="col-md-3">Small Box <%= second.title %></div>
<!--
<div class="col-md-3">Small Box <%= second.title %></div>
<div class="col-md-3">Small Box <%= second.title %></div>
<div class="col-md-3">Small Box <%= second.title %></div>
-->
<% end %>
</div>
</div>
</div>
Upvotes: 0
Views: 670
Reputation: 303
You can use Array#shift to get the first element of your array
<div class="row">
<div class="col-md-6">
Big Box <%= @firstbox.shift.title %>
</div>
<div class="col-md-6">
<div class="row">
<% @firstbox.each do |other| %>
<div class="col-md-3">Small Box <%= other.title %></div>
<% end %>
</div>
</div>
</div>
Upvotes: 1