mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-11 22:24:21 +01:00
13 lines
350 B
Ruby
13 lines
350 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'file_size_validator'
|
|
|
|
class SupportingDocumentFile < ApplicationRecord
|
|
mount_uploader :attachment, SupportingDocumentFileUploader
|
|
|
|
belongs_to :supporting_document_type
|
|
belongs_to :user
|
|
|
|
validates :attachment, file_size: { maximum: ENV.fetch('MAX_SUPPORTING_DOCUMENT_FILE_SIZE', 5.megabytes).to_i }
|
|
end
|