# Acts\_as\_list problem

**URL:** <https://www.ruby-forum.com/t/acts-as-list-problem/144894>\
**Category:** Rails\
**Created:** [August 4, 2008, 2:25am UTC](https://www.ruby-forum.com/t/acts-as-list-problem/144894 "2008-08-04T02:25:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mostafa\_badawi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f14d63/32.png) [@mostafa\_badawi](https://www.ruby-forum.com/u/mostafa_badawi)\
**Post date:** [August 4, 2008, 2:25am UTC](https://www.ruby-forum.com/t/acts-as-list-problem/144894/1 "2008-08-04T02:25:50Z")

</div>

Hi all,  
I’m having this confusing acts\_as\_list problem:

- I have a Slideshow and Slide models, Slide acts as list in the scope  
of  
slideshow

- the first record in the slides db table is \<id : 1, position : 1  
,…\>  
and the second is \<id : 2, position : 2 ,…\>

- when applying that code in the console the results were so strange,

* * *

slideshow.slides.first  
#\<Slide id: 1, position: 1, photo\_id: 1, slideshow\_id: 1\>  
slideshow.slides.first.move\_lower  
true  
slideshow.slides.first  
#\<Slide id: 1, position: 2, photo\_id: 1, slideshow\_id: 1\>  
slideshow.slides[1]  
#\<Slide id: 2, position: 2, photo\_id: 2, slideshow\_id: 1\>

* * *

does any one have any idea about what happened, and how to solve this  
problem.

Thanks in advance,  
yours,  
Mostafa Badaw
