noosfero | Port migration to rails3

Bráulio Bhavamitra gitlab at gitlab.com
Wed Feb 11 11:33:50 BRST 2015


Bráulio Bhavamitra pushed to refs/heads/master at <a href="https://gitlab.com/noosfero/noosfero">Noosfero / noosfero</a>

Commits:
<a href="https://gitlab.com/noosfero/noosfero/commit/174c9bb9bdafc3d662ea16eb1deef6eb20d8dfac">174c9bb9</a> by Braulio Bhavamitra
Port migration to rails3

- - - - -


Changes:

=====================================
lib/acts_as_filesystem.rb
=====================================
--- 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}")

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150211/fcc40b50/attachment.html>


More information about the Noosfero-dev mailing list