title: Line Break for a Ruby Array
body: <p>I am trying to create a program that can group my students randomly into groups of 2. I am working with Ruby on Rails. </p>
  
  <p>I have defined an array on a controller...</p>
  
  <pre><code>def index 
  
  @register_number = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  
  end
  </code></pre>
  
  <p>and I have placed this code in the view, </p>
  
  <pre><code>&lt;%= @register_number.shuffle.each_slice(2).to_a %&gt;
  </code></pre>
  
  <p>on the browser, it appears like this.</p>
  
  <pre><code>[[10, 4], [3, 1], [9, 6], [7, 5], [2, 8]]
  </code></pre>
  
  <p>But I want them to appear with a line break for each "sub-array" so that it looks neater. </p>
  
  <pre><code>[
  [10, 4], 
  [3, 1], 
  [9, 6], 
  [7, 5], 
  [2, 8] 
  ]
  </code></pre>
  
  <p>How do I do it on Ruby on Rails? I do not wish to work with ActiveRecord for now. I am just trying to understand Ruby. Thank you in advance. </p>