Class: StudyType

Inherits:
ApplicationRecord show all
Extended by:
Attributable::Association::Target
Defined in:
app/models/study_type.rb

Defined Under Namespace

Modules: Associations

Class Method Summary collapse

Methods included from Attributable::Association::Target

default, extended, for_select_association

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Warren::BroadcastMessages

#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren

Class Method Details

.include?(studytype_name) ⇒ Boolean

Returns:

  • (Boolean)

11
12
13
14
15
16
17
18
# File 'app/models/study_type.rb', line 11

def self.include?(studytype_name)
  study_type = StudyType.find_by(name: studytype_name)
  unless study_type.nil?
    return study_type.valid_type
  end

  false
end