Module: ReferenceGenome::Associations

Included in:
Study
Defined in:
app/models/reference_genome.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



19
20
21
22
23
# File 'app/models/reference_genome.rb', line 19

def self.included(base)
  base.validates_presence_of :reference_genome_id
  base.validates_numericality_of :reference_genome_id, greater_than: 0, message: 'appears to be invalid'
  base.belongs_to :reference_genome
end