The code powering m.abunchtell.com https://m.abunchtell.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

14 lines
339 B

  1. class MediaAttachment < ApplicationRecord
  2. belongs_to :account, inverse_of: :media_attachments
  3. belongs_to :status, inverse_of: :media_attachments
  4. has_attached_file :file
  5. validates_attachment_content_type :file, content_type: /\Aimage\/.*\z/
  6. validates :account, presence: true
  7. def local?
  8. self.remote_url.blank?
  9. end
  10. end