blob: c407daa785fa9a7fc1c56c01b828c9e5bb8f0b61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
class Import < ActiveRecord::Base
mount_uploader :file, ImportUploader
belongs_to :workbench
belongs_to :referential
extend Enumerize
enumerize :status, in: %i(new pending successful failed canceled)
validates :file, presence: true
before_create do
self.token_download = SecureRandom.urlsafe_base64
end
end
|