Class: Postablr::Entry::Image

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/postablr/entry/image.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#filenameObject

Returns the value of attribute filename.



7
8
9
# File 'app/models/postablr/entry/image.rb', line 7

def filename
  @filename
end

Instance Method Details

#path=(value) ⇒ Object



9
10
11
12
13
14
# File 'app/models/postablr/entry/image.rb', line 9

def path=(value)
  uploaded_file = CarrierWave::SanitizedFile.new :tempfile => value,
  :filename => filename,
  :content_type => photo_content_type
  self.photo = uploaded_file
end