Class: TaxonomyTerm

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Timestamps
Defined in:
app/models/taxonomy_term.rb

Class Method Summary collapse

Class Method Details

.label_for_term(term_id) ⇒ Object



28
29
30
# File 'app/models/taxonomy_term.rb', line 28

def self.label_for_term(term_id)
  where(term_id: term_id).try(:first).try(:label)
end

.purge!Object



24
25
26
# File 'app/models/taxonomy_term.rb', line 24

def self.purge!
  TaxonomyTerm.destroy_all
end