title: Display data in table cells from database table Ruby on Rails
body: <p>I want to display some data from a table and display it in the table cells. I have the following. </p>
  
  <p><strong>Controller</strong> </p>
  
  <pre><code>@data = HospitalBooking.where(:created_at =&gt; @date_range)
  @stuff = [] 
  @stuff[0] = [] 
  
  index = 0 
  
  @stuffs.each do |stuff|
    @rotated[0][index] = stuff.detail0
    index += 1
  end
  </code></pre>
  
  <p>Not sure if I have gone about this the correct way also how would I display it in my view</p>