spec/test_apps/rails-2-3/app/models/category/ancestry_trait.rb
def sync_mother_and_parent_id
      if mother_id_changed?
        self.parent_id = mother_id
      else
        self.mother_id = parent_id
      end
    end
# This method serves two purposes:
# 1. Cache ancestry's virtual parent_id in a real database column because that makes some queries easier
# 2. Allow to set parent_id by setting mother_id so code that uses association reflection works
This method serves two purposes:
1. Cache ancestry's virtual parent_id in a real database column because that makes some queries easier
2. Allow to set parent_id by setting mother_id so code that uses association reflection works
This method serves two purposes : 1 . Cache ancestry ' s virtual parent_id in a real database column because that makes some queries easier 2 . Allow to set parent_id by setting mother_id so code that uses association reflection works
def sync_mother_and_parent_id
      if mother_id_changed?
        self.parent_id = mother_id
      else
        self.mother_id = parent_id
      end
    end
def sync_mother_and_parent_id if mother_id_changed? self . parent_id = mother_id else self . mother_id = parent_id end end
This method serves two purposes:
1.
This method serves two purposes : 1 .