title: Rails - Updating a display of a database and displaying database elements
body: <p>I am trying to figure out how I would go about setting a view page to refresh its display of a table every 1 second or so without refreshing the page.</p>
  
  <p>For my controller I have:</p>
  
  <pre><code>class SendMessageController &lt; ApplicationController
      def index
          @list = model_table.last(10)
      end
  </code></pre>
  
  <p>For my view page I have:</p>
  
  <pre><code>&lt;p&gt;&lt;%= @list.each do |m| %&gt;
  &lt;%= m.column1 %&gt;&lt;br&gt;
  &lt;% end %&gt;&lt;p&gt;
  </code></pre>
  
  <p>I would like it to refresh @list every 1 second so I have an up to date list
  Also after it outputs the last 10 items in column1, why does it output everything in the database?</p>