# No method error for "acts\_as\_tree"?

**URL:** <https://www.ruby-forum.com/t/no-method-error-for-acts-as-tree/127849>\
**Category:** Rails\
**Created:** [February 1, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/no-method-error-for-acts-as-tree/127849 "2008-02-01T20:45:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubylicious](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@rubylicious](https://www.ruby-forum.com/u/rubylicious)\
**Post date:** [February 1, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/no-method-error-for-acts-as-tree/127849/1 "2008-02-01T20:45:18Z")

</div>

I’m running Rails 2.0 and I’m getting this error (undefined method  
`acts\_as\_tree’) when trying to use the ‘acts\_as\_tree’ functionality in  
one of my models:

class Topic \< ActiveRecord::Base  
has\_many :pages  
has\_many :screens, :through =\> :pages  
has\_many :folders  
has\_many :courses, :through =\> :folders  
acts\_as\_tree :order =\> “title”  
end

I have the “topic” table in my db setup as follows:

create\_table :topics do |t|  
t.string :title  
t.integer :parent\_id  
end

What gives?

---

<div class="post-metadata">

**Author:** ![rubylicious](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@rubylicious](https://www.ruby-forum.com/u/rubylicious)\
**Post date:** [February 1, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/no-method-error-for-acts-as-tree/127849/2 "2008-02-01T21:39:38Z")

</div>

Did this get replaced by a plugin?

I’ve found a similar construct called “acts\_as\_ordered\_tree” that I  
could use as a plugin, but I want to be sure before going forward.

Thanks,

---

<div class="post-metadata">

**Author:** ![rubylicious](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@rubylicious](https://www.ruby-forum.com/u/rubylicious)\
**Post date:** [February 1, 2008, 9:49pm UTC](https://www.ruby-forum.com/t/no-method-error-for-acts-as-tree/127849/3 "2008-02-01T21:49:59Z")

</div>

Yes, acts\_as\_tree (acts\_as\_list, acts\_as\_nested\_set, autocomplete,…)  
were removed from Rails core and released separately as plugins in  
2.x.

On Feb 1, 3:39 pm, Corey M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
