This commit is contained in:
parent
03fb6c16ec
commit
e8875c6046
15 changed files with 184 additions and 7 deletions
14
app/models/import.rb
Normal file
14
app/models/import.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Import < ApplicationRecord
|
||||
self.inheritance_column = false
|
||||
|
||||
enum type: [:following, :blocking]
|
||||
|
||||
belongs_to :account
|
||||
|
||||
FILE_TYPES = ['text/plain', 'text/csv'].freeze
|
||||
|
||||
has_attached_file :data, url: '/system/:hash.:extension', hash_secret: ENV.fetch('PAPERCLIP_SECRET')
|
||||
validates_attachment_content_type :data, content_type: FILE_TYPES
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue