Class: Inferno::Repositories::Headers::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/inferno/repositories/headers.rb

Instance Method Summary collapse

Instance Method Details

#before_createObject



7
8
9
10
# File 'lib/inferno/repositories/headers.rb', line 7

def before_create
  self.id = SecureRandom.uuid
  super
end

#validateObject



12
13
14
15
# File 'lib/inferno/repositories/headers.rb', line 12

def validate
  super
  errors.add(:request_id, 'must be present') if request_id.blank?
end