Class: MessageAttachment

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/message_attachment.rb

Instance Method Summary collapse

Instance Method Details

#file_readabilityObject



8
9
10
11
12
13
# File 'app/models/message_attachment.rb', line 8

def file_readability
  if file.blank? or !File.exist?(file) or !File.read(file)
    errors.add(:file, "does not exist?!")
  end
  true
end