Sha256: 7add1ba8aa124db0c2dba6a0fa24f2d0d719e5b567ae6d98c67ed0317dce059d

Contents?: true

Size: 388 Bytes

Versions: 2

Compression:

Stored size: 388 Bytes

Contents

module Popolo
  # A URL for a document about a person.
  class Link
    include Mongoid::Document

    embedded_in :person, class_name: 'Popolo::Person'

    # A URL for a document about a person.
    field :url, type: String
    # A note, e.g. 'Wikipedia page'.
    field :note, type: String

    validates_presence_of :url
    # @note Add URL validation to match JSON Schema?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
popolo-0.0.2 app/models/popolo/link.rb
popolo-0.0.1 app/models/popolo/link.rb