0
0
Fork 0

Import feature for following/blocking lists (addresses #62, #177, #201, #454)

This commit is contained in:
Eugen Rochko 2017-03-30 19:42:33 +02:00
parent 03fb6c16ec
commit e8875c6046
15 changed files with 184 additions and 7 deletions

14
app/models/import.rb Normal file
View 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