Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix readme, small fix in restore_ancestry_integrity!

  • Loading branch information...
commit 39f00abbbca1e6e90b1a268e918342b6950812c5 1 parent 5c90437
Stefan Henzen authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  README.rdoc
  2. +1 −1  lib/ancestry/class_methods.rb
View
2  README.rdoc
@@ -74,7 +74,7 @@ The has_ancestry methods supports the following options:
:destroy All children are destroyed as well (default)
:rootify The children of the destroyed node become root nodes
:restrict An AncestryException is raised if any children exist
- :parentify The orphan subtree is added to the parent of the deleted node.If the deleted node is Root, then rootify the orphan subtree.
+ :adopt The orphan subtree is added to the parent of the deleted node.If the deleted node is Root, then rootify the orphan subtree.
:cache_depth Cache the depth of each node in the 'ancestry_depth' column (default: false)
If you turn depth_caching on for an existing model:
- Migrate: add_column [table], :ancestry_depth, :integer, :default => 0
View
2  lib/ancestry/class_methods.rb
@@ -140,7 +140,7 @@ def restore_ancestry_integrity!
ancestry, parent = if ancestry.nil? then parent else "#{parent}/#{ancestry}" end, parents[parent]
end
node.without_ancestry_callbacks do
- node.update_attribute node.ancestry_column, ancestry
+ node.update_attribute node.ancestry_column, ancestry.to_s
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.