Sha256: f7b56515a00f3a9fc523df01e4e2d718d04cf9f209745bcc517f98ab54342f62
Contents?: true
Size: 844 Bytes
Versions: 99
Compression:
Stored size: 844 Bytes
Contents
require "safe_html" class ArtefactAction include Mongoid::Document include Mongoid::Timestamps::Created field "action_type", type: String field "snapshot", type: Hash GOVSPEAK_FIELDS = [] embedded_in :artefact validates_with SafeHtml # Ideally we would like to use the UID field here, since that will be the # same across all applications, but Mongoid doesn't yet support using a # custom primary key on a related field belongs_to :user # Not validating presence of a user just yet, since there may be some # circumstances where we can't reliably determine the user. As an example # of this, requests made through the API are not yet tied to a user. If we # find out that there are no such circumstances in practice, we can add a # validator for :user. validates_presence_of :action_type, :snapshot end
Version data entries
99 entries across 99 versions & 1 rubygems