# Acts\_as\_list problem with records coming in and out

**URL:** <https://www.ruby-forum.com/t/acts-as-list-problem-with-records-coming-in-and-out/57677>\
**Category:** Rails\
**Created:** [April 12, 2006, 10:37pm UTC](https://www.ruby-forum.com/t/acts-as-list-problem-with-records-coming-in-and-out/57677 "2006-04-12T22:37:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emin\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/5f8ce5/32.png) [@Emin\_H](https://www.ruby-forum.com/u/Emin_H)\
**Post date:** [April 12, 2006, 10:37pm UTC](https://www.ruby-forum.com/t/acts-as-list-problem-with-records-coming-in-and-out/57677/1 "2006-04-12T22:37:58Z")

</div>

I have the model that acts as list

acts\_as\_list :scope =\> ‘featured=1’

As you can see, I only need to order the records that are featured.  
However,  
from time to time I switch some featured items off and mark others as  
featured. When this is done, I start getting dublicate numbers on the  
list  
and ordering starts getting problem…

What would be the good approach to add/remove items to the featured list  
while not breaking positions?

---

<div class="post-metadata">

**Author:** ![Emin\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/5f8ce5/32.png) [@Emin\_H](https://www.ruby-forum.com/u/Emin_H)\
**Post date:** [April 13, 2006, 8:26am UTC](https://www.ruby-forum.com/t/acts-as-list-problem-with-records-coming-in-and-out/57677/2 "2006-04-13T08:26:18Z")

</div>

Anybody having similar problem?

I think, one of the ways would be to renumber all the featured items  
once  
records goes in or out
