Adopt not being honored as an orphan strategy in 1.3.0 #145

Open
chrispatterson opened this Issue Jul 18, 2013 · 0 comments

Comments

Projects
None yet
1 participant

The current readme indicates that :adopt should be a valid orphan strategy. I get AncestryExceptions when attempting to specify this.

ruby 2.0.0p195 (2013-05-14 revision 40734) / Rails 3.2.13

Don't know whether this is a documentation or feature issue, but my expectation would have been that this would work.

$rails c
2.0.0-p195 :001 > TreeNode.find(:first)
Ancestry::AncestryException: Invalid orphan strategy, valid ones are :rootify, :restrict and :destroy.
class TreeNode < ActiveRecord::Base
  has_ancestry :orphan_strategy => :adopt 
end

Solved my immediate issue by upgrading to ancestry 2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment