diff options
author | Effy Elden <github@effy.is> | 2017-04-17 01:41:33 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-17 01:41:33 +1000 |
commit | acd33101c50ba0cf09c1c41616f919d37760f3f7 (patch) | |
tree | 43564c181a7f58ce7471026bd0daa099344330e8 /app/models/import.rb | |
parent | fd81916e8625e5de39855522300eaeffd85ee13d (diff) | |
parent | 99226aba9391535a20d3cc6dba0f45e5792c73d4 (diff) |
Merge branch 'master' into fix/cache_blocking
Diffstat (limited to 'app/models/import.rb')
-rw-r--r-- | app/models/import.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/models/import.rb b/app/models/import.rb index 3013bc50e..85f6ca4bd 100644 --- a/app/models/import.rb +++ b/app/models/import.rb @@ -1,13 +1,15 @@ # frozen_string_literal: true class Import < ApplicationRecord + FILE_TYPES = ['text/plain', 'text/csv'].freeze + self.inheritance_column = false - enum type: [:following, :blocking, :muting] + belongs_to :account, required: true - belongs_to :account + enum type: [:following, :blocking, :muting] - FILE_TYPES = ['text/plain', 'text/csv'].freeze + validates :type, presence: true has_attached_file :data, url: '/system/:hash.:extension', hash_secret: ENV['PAPERCLIP_SECRET'] validates_attachment_content_type :data, content_type: FILE_TYPES |