Class: Damselfly::Attachment

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

Instance Method Summary collapse

Instance Method Details

#data=(value) ⇒ Object



11
12
13
14
# File 'app/models/damselfly/attachment.rb', line 11

def data=(value)
  self.file.file = value
  self.filename = value.original_filename
end

#fileObject



16
17
18
# File 'app/models/damselfly/attachment.rb', line 16

def file
  super || build_file
end