Class: Wordpress::Relationship

Inherits:
WpBase
  • Object
show all
Defined in:
app/models/wordpress/relationship.rb

Instance Method Summary collapse

Methods inherited from WpBase

prefix_table_name

Instance Method Details

#decrement_term_use_countObject



22
23
24
# File 'app/models/wordpress/relationship.rb', line 22

def decrement_term_use_count
  self.taxonomy.update_attribute(:count, self.taxonomy.count - 1) if self.taxonomy.present?
end

#increment_term_use_countObject



18
19
20
# File 'app/models/wordpress/relationship.rb', line 18

def increment_term_use_count
  self.taxonomy.update_attribute(:count, self.taxonomy.count + 1) if self.taxonomy.present?
end