def _before_validation
      fix_basedirpath

      # parent, basedirpath
      if self.parent_id.nil? && !self.basedirpath.blank?
        set_parent_from_basedirpath
      elsif self.basedirpath.nil? && !self.parent_id.nil?
        set_basedirpath_from_parent
      end

      set_basepath
    end
def _before_validation
      fix_basedirpath

      # parent, basedirpath
      if self.parent_id.nil? && !self.basedirpath.blank?
        set_parent_from_basedirpath
      elsif self.basedirpath.nil? && !self.parent_id.nil?
        set_basedirpath_from_parent
      end

      set_basepath
    end
callbacks