title: Adding serial number in my table
body: <p>I have a very simple question but I want to know the unique way of doing this. I have a model called <code>Employee</code> and I am doing a db query to search for active users by doing </p>
  
  <pre><code>Employee.where(:status =&gt; "active")
  </code></pre>
  
  <p>Now I need to display all these in a table. Everything works well but I want to serialize each values so I was using <code>id</code> till now, but when I do the query </p>
  
  <pre><code>@id = Employee.where(:status =&gt; "active").collect{|a| a.id}
  </code></pre>
  
  <p>to the db I get id's like this <code>[2, 3, 4, 5, 8, 29, 30]</code> but i would rather want [1,2,3,4,5,6,...].</p>
  
  <p>Please help how to handle this in my view file where I add my table's serial numbers. </p>