make it work

This commit is contained in:
Pranav
2025-06-27 16:24:36 -07:00
parent 5eb94fc545
commit f73e328709
+3 -1
View File
@@ -34,9 +34,11 @@ class Attachment < ApplicationRecord
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
application/vnd.openxmlformats-officedocument.wordprocessingml.document
].freeze
has_one_attached :file
belongs_to :account
belongs_to :message
has_one_attached :file
validate :acceptable_file
validates :external_url, length: { maximum: Limits::URL_LENGTH_LIMIT }
enum file_type: { :image => 0, :audio => 1, :video => 2, :file => 3, :location => 4, :fallback => 5, :share => 6, :story_mention => 7,