This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
2017-03-30 19:42:33 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Import < ApplicationRecord
|
|
|
|
self.inheritance_column = false
|
|
|
|
|
2017-04-12 18:20:44 +02:00
|
|
|
enum type: [:following, :blocking, :muting]
|
2017-03-30 19:42:33 +02:00
|
|
|
|
|
|
|
belongs_to :account
|
|
|
|
|
|
|
|
FILE_TYPES = ['text/plain', 'text/csv'].freeze
|
|
|
|
|
2017-04-01 22:16:26 +02:00
|
|
|
has_attached_file :data, url: '/system/:hash.:extension', hash_secret: ENV['PAPERCLIP_SECRET']
|
2017-03-30 19:42:33 +02:00
|
|
|
validates_attachment_content_type :data, content_type: FILE_TYPES
|
|
|
|
end
|