Sha256: 023696832775a5a57ed0469c2c4a5650348c9776b468cefaaf4b427da3817bb7

Contents?: true

Size: 447 Bytes

Versions: 48

Compression:

Stored size: 447 Bytes

Contents

module Inferno
  module Repositories
    class Headers < Repository
      class Model < Sequel::Model(db)
        many_to_one :request, class: 'Inferno::Repositories::Requests::Model', key: :request_id

        def before_create
          self.id = SecureRandom.uuid
          super
        end

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

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
inferno_core-0.4.29 lib/inferno/repositories/headers.rb
inferno_core-0.4.28 lib/inferno/repositories/headers.rb
inferno_core-0.4.27 lib/inferno/repositories/headers.rb
inferno_core-0.4.26 lib/inferno/repositories/headers.rb
inferno_core-0.4.25 lib/inferno/repositories/headers.rb
inferno_core-0.4.24 lib/inferno/repositories/headers.rb
inferno_core-0.4.23 lib/inferno/repositories/headers.rb
inferno_core-0.4.22 lib/inferno/repositories/headers.rb
inferno_core-0.4.21 lib/inferno/repositories/headers.rb
inferno_core-0.4.20 lib/inferno/repositories/headers.rb
inferno_core-0.4.19 lib/inferno/repositories/headers.rb
inferno_core-0.4.18 lib/inferno/repositories/headers.rb
inferno_core-0.4.17 lib/inferno/repositories/headers.rb
inferno_core-0.4.16 lib/inferno/repositories/headers.rb
inferno_core-0.4.15 lib/inferno/repositories/headers.rb
inferno_core-0.4.14 lib/inferno/repositories/headers.rb
inferno_core-0.4.13 lib/inferno/repositories/headers.rb
inferno_core-0.4.12 lib/inferno/repositories/headers.rb
inferno_core-0.4.11 lib/inferno/repositories/headers.rb
inferno_core-0.4.10 lib/inferno/repositories/headers.rb