Acts_as_tree :order => not working

Hi,

I am having a problem with the acts_as_tree method. It isn’t respecting
the :order => “blah blah”.

Currently i’ve got a module

class MyModel < ActiveRecord::Base

acts_as_tree :order => ‘created_at DESC’

end

It isn’t sorting by the creation date at all, i can’t get it to order by
any column. Even if i put in junk data into the :order such as :order
=> ‘this column doesn’t exist’ it still won’t raise an error.

I checked the log/development.txt file and i can see where it is doing
the queries but it isn’t including the ORDER BY part.

Any ideas?

Nathan Rambarran wrote:

Hi,

Any ideas?

Did you insert the required field “parent_id” in MyModel?

Ilan B. wrote:

Nathan Rambarran wrote:

Hi,

Any ideas?

Did you insert the required field “parent_id” in MyModel?

I did.