Class: SampleType
- Inherits:
-
ActiveRecordShared
- Object
- ActiveRecord::Base
- ActiveRecordShared
- SampleType
- Defined in:
- app/models/sample_type.rb
Overview
requires
* description ( unique and > 3 chars )
Instance Method Summary collapse
- #is_child? ⇒ Boolean
- #is_root? ⇒ Boolean
-
#to_s ⇒ Object
Returns description.
Instance Method Details
#is_child? ⇒ Boolean
33 34 35 |
# File 'app/models/sample_type.rb', line 33 def is_child? !is_root? end |
#is_root? ⇒ Boolean
29 30 31 |
# File 'app/models/sample_type.rb', line 29 def is_root? parent_id.blank? end |
#to_s ⇒ Object
Returns description
25 26 27 |
# File 'app/models/sample_type.rb', line 25 def to_s description end |