Sha256: dd6cac4df564adbb8c52fb173e620c63a78e270c0444dfce20d3cfd13a0cdc5d
Contents?: true
Size: 545 Bytes
Versions: 2
Compression:
Stored size: 545 Bytes
Contents
module Logistics module Core class OperationDocument < ApplicationRecord mount_base64_uploader :file, DocumentUploader belongs_to :operation belongs_to :user, class_name: 'Mks::Auth::User', optional: true scope :accepted, -> { where(:accepted => true) } scope :remaining, -> { where(:accepted => false) } validates :document, :original, :copy, :certified, :operation, presence: true def user_name self.user&.first_name.to_s + ' ' + self.user&.last_name.to_s end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
logistics_core-20.9.1 | app/models/logistics/core/operation_document.rb |
logistics_core-20.8.1 | app/models/logistics/core/operation_document.rb |