app/models/concept/validations.rb
# top terms must never be used as descendants (narrower relation targets)
# NB: for top terms themselves, this is covered by `ensure_exclusive_top_term`
top terms must never be used as descendants (narrower relation targets)
NB: for top terms themselves, this is covered by `ensure_exclusive_top_term`
top terms must never be used as descendants ( narrower relation targets ) NB : for top terms themselves this is covered by ` ensure_exclusive_top_term `
def rooted_top_terms
      if validatable_for_publishing?
        if narrower_relations.includes(:target). 
            select { |rel| rel.target && rel.target.top_term? }.any?
          errors.add :base, I18n.t('txt.models.concept.top_term_rooted_error')
        end
      end
    end
def rooted_top_terms if validatable_for_publishing? if narrower_relations . includes ( :target ) . select { | rel | rel . target && rel . target . top_term? } . any? errors . add :base , I18n . t ( 'txt.models.concept.top_term_rooted_error' ) end end end
top terms must never be used as descendants (narrower relation targets)
NB: for top terms themselves, this is covered by `ensure_exclusive_top_term`
top terms must never be used as descendants ( narrower relation targets ) NB : for top terms themselves this is covered by ` ensure_exclusive_top_term `
# XXX: inefficient?