Class: Cdx::Taxon

Inherits:
ApplicationRecord show all
Defined in:
app/models/cdx/taxon.rb

Instance Method Summary collapse

Methods included from AttachmentMacros

#has_many_attached, #has_one_attached

Instance Method Details

#content_header_titleObject

Methods



12
13
14
# File 'app/models/cdx/taxon.rb', line 12

def content_header_title
  name_was
end

#full_path_tagObject



16
17
18
# File 'app/models/cdx/taxon.rb', line 16

def full_path_tag
  parent_path_tag(self, name)
end

#parent_path_tag(taxon, string) ⇒ Object



20
21
22
23
# File 'app/models/cdx/taxon.rb', line 20

def parent_path_tag(taxon, string)
  return string unless taxon.parent
  parent_path_tag(taxon.parent, "#{taxon.parent.name} -> #{string}")
end