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