Commit 174c9bb9bdafc3d662ea16eb1deef6eb20d8dfac

Authored by Braulio Bhavamitra
1 parent f8fab09f

Port migration to rails3

Showing 1 changed file with 1 additions and 2 deletions   Show diff stats
lib/acts_as_filesystem.rb
... ... @@ -35,8 +35,7 @@ module ActsAsFileSystem
35 35 def build_ancestry(parent_id = nil, ancestry = '')
36 36 ActiveRecord::Base.transaction do
37 37 self.base_class.all(:conditions => {:parent_id => parent_id}).each do |node|
38   - node.ancestry = ancestry
39   - node.send :create_or_update_without_callbacks
  38 + node.update_column :ancestry, ancestry
40 39  
41 40 build_ancestry node.id, (ancestry.empty? ? "#{node.formatted_ancestry_id}" :
42 41 "#{ancestry}#{node.ancestry_sep}#{node.formatted_ancestry_id}")
... ...