Sha256: 3e601c367c4944129d4a22f0ccee9cff545d3cd53d70949b8a43777d117b8b29
Contents?: true
Size: 793 Bytes
Versions: 30
Compression:
Stored size: 793 Bytes
Contents
require "safe_html" class ArtefactAction include Mongoid::Document include Mongoid::Timestamps::Created field "action_type", type: String field "snapshot", type: Hash embedded_in :artefact # 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
30 entries across 30 versions & 1 rubygems