# Acts\_as\_tree and acts\_as\_list trouble

**URL:** <https://www.ruby-forum.com/t/acts-as-tree-and-acts-as-list-trouble/53000>\
**Category:** Rails\
**Created:** [December 10, 2005, 9:06pm UTC](https://www.ruby-forum.com/t/acts-as-tree-and-acts-as-list-trouble/53000 "2005-12-10T21:06:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![scottnj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Post date:** [December 10, 2005, 9:06pm UTC](https://www.ruby-forum.com/t/acts-as-tree-and-acts-as-list-trouble/53000/1 "2005-12-10T21:06:10Z")

</div>

I am having trouble with acts\_as\_tree and acts\_as\_list?

I have a table, pages = :id,:parent\_id,:position,:title,:name.

In my model I have  
acts\_as\_tree :order =\> “position”  
acts\_as\_list :scope =\> :parent\_id

When I add/remove rows, the position column updates perfect.

But when I try  
@pg[@pg.position - 1].move\_higher

I get:  
NoMethodError in Admin#move\_page\_lower  
You have a nil object when you didn’t expect it!  
The error occured while evaluating nil.move\_higher"

and with:  
@pg.pages[@pg.position - 1].move\_higher

I get:  
undefined method `pages’ for #Page:0x3761718

How do I do a move\_higher with acts\_as\_tree AND acts\_as\_list???
