Question: First, what is a @books or a @planes (from a select(:all)) in rails? Is it an array? A list? How is it named? The official rails guide about layout and rendering never names it.

Secondly, is there another way to browse it than each do? I have a specific case where i need to browse "by hand" the results, how can i do that?

EDIT :

I want to do that :

```
    <table>
    <% 3.times do %>
    <tr>
      <% 4.times do %>
        <td>
          <%if collection= @collections.next%>
              <%=  collection.main_image.url(:vignette) %>
          <%end%>
        </td>
      <%end%>
    </tr>
    <%end%>
  </table>

```

It is supposed to display an array of 12 (different) collection's pictures. The array is completed even if there is not 12 entry in the result.

The `if collection= @collections.next` is to at the same time test for a next entry and assignating it. Of course it does not works.

Answer: 
You can do something on the following lines:

```
<%- array = (1..12).to_a %>

<table>
  <%- array.zip(@collections).each_slice(4) do |collections| %>
    <tr>
    <%- collections.each do |number, collection| %>
      <td><%= collection.main_image.url(:vignette) unless collection.blank? %></td>
    <%- end %>
    </tr>
  <%- end %>
</table>

```
Use `each_slice`. This way you can group your items per row (if that is what you are attempting):

```
collections = (1..20).to_a

collections.each_slice(4) { |collection|
  puts "----------------"
  puts collection.join(" | ")
}

```

Output:

```
----------------
1 | 2 | 3 | 4
----------------
5 | 6 | 7 | 8
----------------
9 | 10 | 11 | 12
----------------
13 | 14 | 15 | 16
----------------
17 | 18 | 19 | 20

```