Class: SampleType

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

Overview

requires

* description ( unique and > 3 chars )

Instance Method Summary collapse

Instance Method Details

#is_child?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'app/models/sample_type.rb', line 33

def is_child?
	!is_root?
end

#is_root?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'app/models/sample_type.rb', line 29

def is_root?
	parent_id.blank?
end

#to_sObject

Returns description



25
26
27
# File 'app/models/sample_type.rb', line 25

def to_s
	description
end