Class: Highrise::Task::TaskCategory

Inherits:
Base
  • Object
show all
Defined in:
lib/highrise/task.rb

Overview

TODO: combine with DealCategory in a single model maybe

Class Method Summary collapse

Class Method Details

.delete!(name) ⇒ Object



11
12
13
14
# File 'lib/highrise/task.rb', line 11

def self.delete!(name)
  category = self.find_by_name(name)
  delete(category.id) if category
end

.find_by_name(name) ⇒ Object



7
8
9
# File 'lib/highrise/task.rb', line 7

def self.find_by_name(name)
  find(:all).select{|category| category.name == name}.first
end