Class: OperationalEventType

Inherits:
ActiveRecordShared show all
Defined in:
app/models/operational_event_type.rb

Overview

requires

* key ( unique ) * description ( unique and > 3 chars )

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.categoriesObject



23
24
25
26
27
28
29
# File 'app/models/operational_event_type.rb', line 23

def self.categories
	find(:all,
		:conditions => 'event_category IS NOT NULL',
		:order => 'event_category ASC',
		:group => :event_category
	).collect(&:event_category)
end

Instance Method Details

#to_sObject

Returns event_category.



19
20
21
# File 'app/models/operational_event_type.rb', line 19

def to_s
	"#{event_category}:#{description}"
end