From 174c9bb9bdafc3d662ea16eb1deef6eb20d8dfac Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Wed, 11 Feb 2015 10:30:50 -0300 Subject: [PATCH] Port migration to rails3 --- lib/acts_as_filesystem.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/acts_as_filesystem.rb b/lib/acts_as_filesystem.rb index 92243f1..b9bae29 100644 --- a/lib/acts_as_filesystem.rb +++ b/lib/acts_as_filesystem.rb @@ -35,8 +35,7 @@ module ActsAsFileSystem def build_ancestry(parent_id = nil, ancestry = '') ActiveRecord::Base.transaction do self.base_class.all(:conditions => {:parent_id => parent_id}).each do |node| - node.ancestry = ancestry - node.send :create_or_update_without_callbacks + node.update_column :ancestry, ancestry build_ancestry node.id, (ancestry.empty? ? "#{node.formatted_ancestry_id}" : "#{ancestry}#{node.ancestry_sep}#{node.formatted_ancestry_id}") -- libgit2 0.21.2