Class: DataReleaseStudyType
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- DataReleaseStudyType
- Extended by:
- Attributable::Association::Target
- Defined in:
- app/models/data_release_study_type.rb
Overview
On Study creation the user selects a DataReleaseStudyType from a drop down list of pre-registered data release study types. The default option is determined by the #is_default flag in the database
This information is exposed:
-
In the warehouses, where it may be used by customers, NPG, or bioinformaticians
-
Via the V1 API. (Not aware of any uses here, but there may be)
It drives specific behaviours: - Shows the array express accession field on study edit page if #for_array_express is true - Determines if the <ArrayExpress> tag is added to the study accession - Determines the list of valid delay reasons
Defined Under Namespace
Modules: Associations
Instance Attribute Summary collapse
-
#for_array_express ⇒ Boolean
Determines if the study needs an ArrayExpress accession number and adds an <ArrayExpress> tag to the study.xml.
-
#is_assay_type ⇒ Boolean
Controls whether ‘assay of no other use’ as acceptable reason for a delay in data-release in app/views/shared/metadata/edit/_study.html.erb.
-
#is_default ⇒ Boolean
Should be true for single option, sets it as the default DataReleaseStudyType.
Class Method Summary collapse
-
.default ⇒ DataReleaseStudyType
Returns the default DataReleaseStudyType according to the is_default flag.
Methods included from Attributable::Association::Target
default, extended, for_select_association
Methods inherited from ApplicationRecord
alias_association, convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!
Methods included from Squishify
Instance Attribute Details
#for_array_express ⇒ Boolean
Determines if the study needs an ArrayExpress accession number and adds an <ArrayExpress> tag to the study.xml. (This used to trigger generation of an ArrayExpress accession, but I’m not sure this is still the case)
32 |
# File 'app/models/data_release_study_type.rb', line 32 has_many :study |
#is_assay_type ⇒ Boolean
Controls whether ‘assay of no other use’ as acceptable reason for a delay in data-release in app/views/shared/metadata/edit/_study.html.erb
32 |
# File 'app/models/data_release_study_type.rb', line 32 has_many :study |
#is_default ⇒ Boolean
Should be true for single option, sets it as the default DataReleaseStudyType
32 |
# File 'app/models/data_release_study_type.rb', line 32 has_many :study |
Class Method Details
.default ⇒ DataReleaseStudyType
Returns the default DataReleaseStudyType according to the is_default flag.
48 49 50 |
# File 'app/models/data_release_study_type.rb', line 48 def self.default find_by(is_default: true) end |