Couldn't you just add a :before_destroy filter to User?

class User < ActiveRecord::Base

  before_destroy :unlink_comments

  def unlink_comments
    comments.each do |comment|
      comment.author_name = comment.user.login
      comment.author_email = comment.user.email
      comment.user_id = nil
      comment.save
    end
  end

end

(Note: haven't tried this code myself)

-- 
You received this message because you are subscribed to the Google Groups 
"CommunityEngine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/communityengine?hl=en.

Reply via email to