On Feb 14, 2007, at 1:58 PM, Mike Zornek wrote: So far it's working fairly well except that when I destroy an Active Record object the acts_as_versioned plugin is deleting all of the old versions. It's using a method called clear_old_version and in the docs it says:
Mike, You might try removing this line in vendor/plugins/acts_as_versioned/lib/acts_as_versioned.rb :dependent => :delete_all
Mine is on line 189 ymmv.
Afaik acts_as_paranoid overrides destroy so that instead of destroying the record, it sets a deleted_at. Without getting too deep my guess is AR is calling the association code: before_destroy { |record| #{reflection.class_name}.delete_all(%(#{dependent_conditions})) }
So even if acts_as_paranoid overrides the normal behavior of destroy it isn't overriding the before_destroy callback. That's just a guess, please let me know how you make out, I have a project that needs to use both of these plugins for the exact same purpose, so I'd like to know if that resolves it for you.
--flinn |