Ticket #39 (new enhancement)

Opened 1 year ago

migration coming from acts_as_tree

Reported by: rails Assigned to: jcm
Priority: minor Milestone:
Component: doc Version: trunk
Keywords: Cc:

Description

Hello

Suppose I used an order in my old tree

class Foo < ActiveRecord::Base

acts_as_tree :order => 'my_sort'

end

After having added lft and rgt to the DB, I want to migrate the data with

Foo.renumber_all

This calculates all the lft and rgt, but ignores my_sort.

The patch adds an optional parameter to renumber_all to keep the original order

Foo.renumber_all 'my_sort'

Attachments

renumber_all.patch (1.0 kB) - added by rails on 12/20/07 22:53:59.
renumber_all

Change History

12/20/07 22:53:59 changed by rails

  • attachment renumber_all.patch added.

renumber_all