mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
13 lines
361 B
Ruby
13 lines
361 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'file_size_validator'
|
|
|
|
class ProofOfIdentityFile < ApplicationRecord
|
|
mount_uploader :attachment, ProofOfIdentityFileUploader
|
|
|
|
belongs_to :proof_of_identity_type
|
|
belongs_to :user
|
|
|
|
validates :attachment, file_size: { maximum: Rails.application.secrets.max_proof_of_identity_file_size&.to_i || 5.megabytes.to_i }
|
|
end
|