SpeciesFileGroup/taxonworks

View on GitHub
app/models/nomenclatural_rank/icn/species_and_infraspecies_group.rb

Summary

Maintainability
A
0 mins
Test Coverage
class NomenclaturalRank::Icn::SpeciesAndInfraspeciesGroup <  NomenclaturalRank::Icn

  def self.validate_name_format(taxon_name)
    taxon_name.errors.add(:name, 'name must be at least two letters') unless  !taxon_name.name.blank? && taxon_name.name.length > 1
   end

  def self.valid_parents
    self.collect_descendants_to_s(
        NomenclaturalRank::Icn::GenusGroup,
        NomenclaturalRank::Icn::SpeciesAndInfraspeciesGroup)
  end
end